|
发表于 2007-12-12 21:47:03
|
显示全部楼层
$! 在后台运行的最后的工作的PID(进程ID)
$@与$*同义,但是每个参数都是一个独立的""引用字串,这就意味着参数被完整地传递,并没有被解释和扩展。
刚好在看SAMS-Linux_Shell_Scripting_With_Bash,粘上来给你参考
Although both $@ and $* refer to all the parameters, they differ when they are enclosed in double quotes. $* parameters are separated by the first character of the IFS variable, or by spaces if IFS is empty, or without anything when IFS is unset. $* treats the set of parameters as a single group.
$@, on the other hand, always separates the parameters by spaces and treats the parameters as individual items, even when they are enclosed in double quotes. $@ is often used to transfer the entire set of switches to another command (for example, ls $@). |
|