寫bash script時候, 用grep或awk取出來的值, 裡面還包含了一些non-printable的字; 作字串比對時, 就會一直出錯. 這時可以用 tr 這個指令移除看不到的字(如換行符號): # echo $VAR_WITH_NON_PRINT | tr -d '/r/n' 這樣就可以移除換行符號 還有更多種選擇: \NNN character with octal value NNN (1 to 3 octal digits) \\ backslash \a audible BEL \b backspace \f form feed \n new line \r return \t horizontal tab \v vertical tab CHAR1-CHAR2 ...
發表文章
目前顯示的是 2011的文章
Edit the msys.bat, find the line calling rxvt: start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i Change the default font Courier to other font name. start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Consolas-14 -tn msys -geometry 80x25 -e /bin/bash --login -i
原本我在網路上查到的語法是這樣寫的: < link href = "ImageShackURL" rel = "shortcut icon" /> 後來在網路上面查到原來chrome會因為這種寫法而乎略掉第二個參數, 所以應該要反過來寫: < link rel = "shortcut icon" href = "ImageShackURL" /> 參考網址: http://www.google.com.tw/support/forum/p/Chrome/thread?tid=40574c8dcfdfdd33&hl=en&fid=40574c8dcfdfdd3300046ba146ea3741&hltp=2