Linux进程与作业的区别及相关命令(1)(2)
例如:
写一个简单的脚本test
- #!/bin/sh
- ls -l&
- echo "done"
运行:
- alex@cgdp shell]$ ./test
- done
- [alex@cgdp shell]$ total 4
- -rwxrwxr-x 1 alex alex 30 May 5 21:15 test
使用wait命令重写脚本test
- #!/bin/sh
- ls -l&
- wait
- echo "done"
运行:
- [alex@cgdp shell]$ ./test
- total 4
- -rwxrwxr-x 1 alex alex 35 May 5 21:19 test
- done
评论暂时关闭