shell流程控制

  流程控制是面向过程的编程思想,是对问题的解决步骤的代码化!

号外:mysql的内连接删除
delete a from table_aaa  as a  inner join table_bb as b set a.djxh=b.djxh;


\  跳脱字符,接触特殊字符的含义,原样输出字符 escape 
||  //or if/while
$#  //参数总数量,局部
$*  //完全的参数字符串,整体  $1..$x,不含$0
$@  
#
!/bin/bash //不写默认sh echo "are you ok? $*" //依次输出参数 shift n //向左移动n个字符,默认n是1,左移1 test expression //测试表达式,true/false //shell流程控制 #if fi exp1 ; then commands fi if exp1 //对称行if -->fi then commands elif exp2 commands else exp3 commands fi #case case var1 in str1) commands;; //;;终止符跳出判断 str2) commands;; *) commands;; esac #for for var1 in list //对list的每个参数,走一遍操作 do commands done for var1 //对着参数操作 do commands done #while until while : | true |exp //条件为真则继续操作 do commands done until exp //条件为假不在继续操作, do commands done #break/continue break //退出当前循环结构 continue //终止继续,执行下一次循环

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值