X-zcer / PIT-with-RTS

0 stars 0 forks source link

(四十六)shell中执行一个字符串命令的方法 #47

Open X-zcer opened 6 years ago

X-zcer commented 6 years ago

eval $cmd eg../script_cmd.sh 2_chooseprojects.txt "find -name pitest_skip*.txt|xargs grep 'No space left'|wc -l"的脚本中的eval语句

【`eval $cmd`、$($cmd)、echo `$cmd`都不一定有效;echo $cmd是输出cmd的字符串。】