- 博客(2)
- 收藏
- 关注
转载 shell编程中while与for的区别
shell编程中常用的循环:while 和 for,在使用的过程中,会发现一些差别。 1. 代码 1 #!/bin/bash 2 3 # while loop 4 echo -en "\t";date 5 cat abc.txt|while read user ip 6 do 7 { 8 ssh -oConnectTimeout=10...
2013-09-08 10:25:00 96
转载 shell编程中fork/exec/source的区别
Linux中shell脚本编程,通常涉及到调用,下面列出几种调用的区别 1. fork方式 创建sub-shell,在sub-shell中执行命令,执行完成返回父shell(sub-shell环境变量不影响父shell,默认方式) 通常,我们执行 sh ./test.sh 或者 ./test.sh 就是这种方式。 2. source方式 在当...
2013-09-07 15:05:00 103
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人