zoukankan      html  css  js  c++  java
  • Linux 结构化命令

    if -then 语句

    if -then 语句有如下格式

    if command

    then 

    commands

    f i

    bash shell 的if语句会先运行if后面的那个命令,如果改命令的退出状态码是0的话,位于then 部分的命令就会被执行,如果该命令的状态码是其他值的话。then部分的命令就不会被执行,bash shell 会继续执行脚本中的下一个命令,f i 语句表示if -then 语句到此结束

    说明:if-then 语句还有另外一种形式

    if command ;then

    commands

    f i

    if-then-else语句

    if command

    then

    commands

    else

    commands

    f i

  • 相关阅读:
    笔试
    Java
    工作中问题总结
    suitcrm安装及虚拟机
    python邮件读取2
    restful api
    python 邮件读取
    suiteCRM____Admin
    pdf提取信息到excel
    Maven笔记
  • 原文地址:https://www.cnblogs.com/zhang-jun-jie/p/9848134.html
Copyright © 2011-2022 走看看