shell脚本编写注意事项

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

之前写python写习惯了

test = ‘free -m’

在shell中不能有空格

test='free -m'

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

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

test='free -m | head -2'

原文地址:https://www.cnblogs.com/lgh344902118/p/7525062.html