此程序错误
echo enter the file name
read fname
If [-a $fname]
then
echo "$num is negative"
else
echo "cannot find a file"
错误是:
bsccs.sh: line 3: [-a: command not found
cannot find a file
答案 0 :(得分:1)
你需要一个空间:
if [ -a $fname ]
此外,'如果'无效。它必须是小写的。