码迷,mamicode.com
首页 > 系统相关 > 详细

Shell脚本之for语句

时间:2018-12-08 15:49:49      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:技术分享   for语句   shell脚本   9.png   png   shel   command   技术   循环   

在shell语句中的for有两种的格式,具体的使用help  for 命令来查看帮助

  技术分享图片

for循环语句的主要的格式有:

格式一:   for  x  in   do  command  done 

格式二:for((exp1:exp2:exp3)) ;  do  command   :done 

使用for来编写for99

 技术分享图片

结果如下图所示:

   技术分享图片

Shell脚本之for语句

标签:技术分享   for语句   shell脚本   9.png   png   shel   command   技术   循环   

原文地址:https://www.cnblogs.com/yang-1yang/p/10087585.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!