我有上面的 shell 脚本。
#!/bin/bash
# a shell script that keeps looping until an exit code is given
nice php -q -f ./data.php -- $@
ERR=$?
exec $0 $@
我有几个疑问
- 什么是
$0
什么$@
- 什么是
ERR=$?
-- $@
第 5 行做什么- 我想知道是否可以将 data.php 作为参数传递。所以我只有我所有类型的执行的 shell 脚本。说,我想运行“sh ss.sh data1.php”那么这应该运行data1.php,如果运行“ss ss.sh data2.php”它应该运行data2.php -</li>