shell 在ubuntu 里的报错 [: test: unexpected operator​
? shell ?    2019-07-10 15:19:11    457    0    0
gua_l   ? shell ?

 

shell 里做 判断时[ 左边一直报错,语法无问题,有redhat 里执行没有问题,脚本放到ubuntu 时报错

[: test: unexpected operator​

 

解决:

ubuntu 的shell 默认指向dash , 需要改回bash

sudo dpkg-reconfigure dash

选择 no

Pre: Gitlab 新手入门

Next: Redhatl 7.1 安装 pip

457
Sign in to leave a comment.
No Leanote account? Sign up now.
0 comments
Table of content