1. 首页
  2. 数据库
  3. 其它
  4. shell—for循环语句

shell—for循环语句

上传者: 2021-02-01 09:54:05上传 PDF文件 26.62KB 热度 23次
shell中for循环 生成1-5序列 生成1-5序列 第一种: [root@server19 mnt]# awk 'BEGIN{for(i=1;i<=5;i++){print i}}' 1 2 3 4 5 第二种: [root@server19 mnt]# vim for1.sh for NUM in `seq 5` do echo $NUM done [root@server19 mnt]# sh for1.sh 1 2 3 4 5 第三种: [root@server19 mnt]# vim for3.sh for ((A=1;A<=5;A++)) do e
下载地址
用户评论