" [:操作系统:意外的操作员" shell中的错误

时间:2017-09-25 20:45:06

标签: shell ubuntu terminal

#!/bin/sh

echo "List of file which have read ,write and executable permissions in the current directory are: "

for file in *    
do
  if  [ -r $file -a -w $file -a -x $file ]
  then
    echo $file
  fi
done

为什么会出现这样的错误:

os1f.sh: 6: [: OS: unexpected operator

0 个答案:

没有答案