美文网首页
shell&python中的if else语句

shell&python中的if else语句

作者: Ten_Minutes | 来源:发表于2018-04-27 16:54 被阅读13次

shell:

shell中的if语句 shell中的if else语句

Python:

python中的if else语句 python中的if elif语句

注意:

1.shell中[ expression ]中的expression必须与[]保持空格,否则会报错;并且if也要与[]之间保持空格

2.shell中的if /if else/ if elif语句中if或者elif后面都必须加then,else后面不需要加then;最后面都必须是fi

3.Python中if后面没有 [ ] ,但是表达式后面有  :   并且python没有then,没有if

相关文章

网友评论

      本文标题:shell&python中的if else语句

      本文链接:https://www.haomeiwen.com/subject/zucilftx.html