如何将命令存储在shell脚本中的变量中?
command="ls";echo "Command: $command"; #Output is: Command: lsb=`$command`;echo $b; #Output is: public_html REV test... (command worked successfully)
command="ls | grep -c '^'";
Command: ls | grep -c '^'ls: cannot access |: No such file or directory ls: cannot access grep: No such file or directory ls: cannot access '^': No such file or directory
冉冉说
慕码人2483693
斯蒂芬大帝