shell脚本编写注意事项

shell中赋值变量时不能有空格

之前写python写习惯了

test = ‘free -m’

在shell中不能有空格

test='free -m'

而且使用管道符之前要留空格

test='free -m|head -2'是错误的

test='free -m | head -2'

posted @ 2017-09-15 10:35  菲菲菲菲菲常新的新手  阅读(232)  评论(0)    收藏  举报