首页 > 代码库 > shell 练习
shell 练习
shell 练习
iii=0while [ $iii -lt 100 ] do iii=$[$iii+1] echo -n "$iii " doneiii=0until ! [ $iii -lt 100 ] do iii=$[$iii+1] echo -n "$iii " doneecho while until num is done while truedo echo ‘plase input your operate !‘ read BBB if [ "$BBB" = "out" ] then break fidoneecho while until is done for i in root mjorce jorcen normal do echo i is $i doneecho i si $i ;for f in 123 4123 /etc/profile.d/*.sh do echo f is $fdonefor i in `seq 1 3` do echo -n "$i " && sleep 1 done PIDS="`pgrep httpd`"[ -z "$PIDS" ] && echo ‘httpd is not running !‘ && echo exifor i in $PIDS do kill -9 $i doneecho httpd is killed Myfun (){ echo patams1 is $1 echo -n "now i is $i " ! [ "$i" ] && exit ; echo jj return ‘1‘}myf=$(Myfun);echo myf Myfun 12unset MyfunMyfunecho ‘the end !‘$myf
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。