寫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的文章
最近幫自己的舊筆電(x24)灌回了Centos 5, 其python還停留在2.4. 為了要能夠用app engine, python要2.5以上. 最後使用的方法是到python.org下載2.7 source code, confgure make make altinstall 就可以並存了, 預設安裝的目錄會跟原本系統內的不同, 於/usr/local/bin/python2.7 接下來需要利用alternatives指令來修改預設的python執行檔-->/usr/bin/python 格式: alternatives [options] --install link name path priority 將原本的2.4和新的2.7都建入alternatives的資料庫中 alternatives --install /usr/bin/python python /usr/bin/python2.4 200 alternatives --install /usr/bin/python python /usr/local/bin/python2.7 400 由於數字大者優先權高, 所以python2.7會被選取囉
Edit your blogger html and add the following javascript to the end of BODY part: < script id="aptureScript" > ( function (){ var a=document.createElement( "script" );a.defer= "true" ; a.src= "http://www.apture.com/js/apture.js?siteToken=vsJttrn" ; document.getElementsByTagName( "head" )[0].appendChild(a);})(); </ script >
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