程序都不能运行了!原本是想模拟多进程,幸亏不是用的root.要不然系统就要崩溃了!
[Linux] bash: fork: retry: Resource temporarily unavailable
2015.3 14
[Shell编程] shell脚本改变工作目录
2015.2 2
shell脚本运行的几种方式: 1:添加脚本的执行权限,然后通过路径加文件名的方式运行 chmod +x test.sh;./test.sh 2:source test.sh 或者 . test.sh 3: sh test.sh 后两种方式不必添加脚本的执行权限。怎么改变shell脚本运行的工作目录呢?请看例子: [sunliguo@sun sgunicom]$ pwd /home/sunliguo/sgunicom [sunliguo@sun sgunicom]$ cat bin/test.sh #!/bin/bash cd / pwd [sunliguo@sun sgunicom]$ sh bin/test.sh / [sunliguo@sun sgunicom]$ pwd /home/sunliguo/sgunicom [sunliguo@sun sgunicom]$ chmod +x bin/test.sh… 阅读全文