我在文件中有这个代码scr.sh:
scr.sh
#!/bin/sh string='ps -e | less' $string
当我执行这个脚本时,它不起作用.为什么?我应该怎么做才能从shell脚本中的字符串变量执行命令?
unix shell
shell ×1
unix ×1