1. http://edsionte.com/techblog/archives/3712 echo和backslash
群記錄:
2 這個只是變數,雙引號的話會阻止shell的分詞 echo "a b"和echo a b不一樣
3 --------
4 "a b"是echo的一個參數 ,而 echo a b 是echo的兩個參數?
5
6
7 那echo -e "\tz" ,被shell解釋成了什麼呢? 還是 “\tz” 吧?然後把"\tz"傳給echo?
8 ---------
9 我這樣理解對麼~?
10 我為SUN狂.cc<walkerxk@gmail.com> 11:51:31
11 "\tz"被shell解釋成了\tz,然後echo拿到的是\tz
12 11:45:03#tp#~> echo '"\tz"'
13 "\tz"
14 11:51:42#tp#~>
15 這裡echo拿到的才是"\tz"
2. $@ $*區別 (man special paraments)
http://blog.sina.com.cn/s/blog_62c5db6e0100hpp8.html
http://m.oschina.net/blog/35905
參考代碼:
2 #!/usr/bin/env bash
3 echo $#
4 echo "******"
5 for i in $*; do echo $i; done
6 echo "--------"
7 for i in $@; do echo $i; done
8 echo "--------"
9 for i in "$*"; do echo $i; done
10 echo "--------"
11 for i in "$@"; do echo $i; done
12 echo "@@@@@@@@"
13 for i in "a" "bc"; do echo $i; done
14 exit
15
16 echo $*
17 echo $@
18 echo "$*"
19 echo "$@"
20
21
22
23 until [ -z "$*" ];
24 do
25 echo "$@"
26 shift
27 done
3. 關於test
http://17610376.blog.51cto.com/366886/405691
http://blog.csdn.net/ottocho/article/details/7248041
http://my.oschina.net/aiguozhe/blog/35937 test [ [[的區別
http://www.ibm.com/developerworks/cn/linux/l-bash-test.html ibm: bash測試和比較函數
http://hi.baidu.com/richardma_/blog/item/1e3672d6a87d5f0aa18bb7d1.html
4. eval shift
http://www.uplinux.com/shizi/wenxian/3778.html
http://hi.baidu.com/shenqb/blog/item/613835dd53d6d6d38d1029d9.html/cmtid/367ab064975ffbfff73654d3
5. 單引號雙引號
http://hi.baidu.com/all_around_all/blog/item/13ef6431993f84db9d3d6264.html
http://www.51testing.com/?uid-47329-action-viewspace-itemid-86711
http://hi.baidu.com/outsmile/blog/item/4f0102c4b5bcbcc139db4985.html
http://www.igigo.net/archives/128 Bash引號那點事(該部落格很贊)
6. 關於Cat
http://www.cnblogs.com/xlmeng1988/archive/2012/03/31/cat.html
7. IFS
http://www.haogongju.net/art/591905
http://pkuwwt.blogspot.jp/2010/06/bashifs.html 推薦
8. screen使用和原理
http://doc.chinaunix.net/linux/200904/239872.shtml
9. ibm:bash參數和參數擴充
http://www.ibm.com/developerworks/cn/linux/l-bash-parameters.html
http://www.heartdemon.com/post/87.html
http://www.cnblogs.com/pengxl/archive/2010/11/30/1887790.html
http://www.51testing.com/?uid-61754-action-viewspace-itemid-96942
http://hi.baidu.com/msingle/blog/item/8fa2b113557b1b2ddd540134.html bash保留字元
http://www.chinaunix.net/jh/24/503842.html
10. shell隨機字串
http://blog.sina.com.cn/s/blog_62c5db6e0100hp61.html
11.