网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  shell脚本之while

shell脚本之while

分类: IT文章 • 2022-05-16 12:29:55
#! /bin/bash
echo if num smaller than 5,it will continue 
num=0
while [ $num -lt 5 ]
do
echo now the num is $num
let num++
done

  

[root@lenny Desktop]# ./while.sh 
if num smaller than 5,it will continue
now the num is 0
now the num is 1
now the num is 2
now the num is 3
now the num is 4

  

相关推荐

  • shell 脚本快速部署 SpringBoot 项目
  • shell脚本学习(1)——输出echo&printf
  • Linux Shell 脚本
  • Linux Shell 脚本学习基础
  • Shell脚本编程基础之shell脚本算术运算 算术运算
  • 通过编写 shell 脚本实现二进制安装 LAMP 架构的 word press
  • shell 脚本实现yum安装 LAMP 架构的 wordpress
  • Shell脚本编程基础之shell脚本逻辑运算 逻辑运算
  • Shell脚本编程基础之shell脚本条件测试命令 条件测试
  • Shell篇之AWK
  • shell脚本之函数的参数
  • 大数据JAVA基础第十六天 1.Integer类成员方法 2.JDK5的新特性:自动装箱 3.引用数据类型变量的强制类型转换 4.String/StringBuffer类概述 5.String类构造方法: 6.String类常用方法: 7.StringBuilder类
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号