WangLu's Notes
久病成医 | Prolonged Illness Makes the Patient a Good Doctor
2008-04-01
bash和sh脚本中关于测试表达式的区别
有两种
[ a = b]
[[ a == b ]]
sh 只认第一种
bash 两种都认
有个脚本我一直没改好,原因是以为是bash脚本(或者说以为sh就是bash),然后就按第二种写了,但是总是没用。 后来发现原来那个是sh脚本,而且man了一下发现sh和bash原来不是一回事。终于搞定了。
No comments:
Post a Comment
Newer Post
Older Post
Home
No comments:
Post a Comment