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