当前位置: 代码迷 >> 综合 >> Shell中的 if esle【if [ ]; then fi 小细节】
  详细解决方案

Shell中的 if esle【if [ ]; then fi 小细节】

热度:105   发布时间:2023-09-05 19:35:41.0

中括号([ ]) 中 要有空格,如图:
Shell中的 if esle【if [ ]; then fi 小细节】

#!/bin/bash
colnum=19
if [ $colnum==19 ];thenecho " colnum == 19"
fi
  相关解决方案