1
我不断收到一个运行时错误,说[:太多的参数。获取[:太多的参数
这里是我的代码
变量
mem_list=/root/Desktop/Dan/List/list.txt
word=[user inputs some word]
代码:
if [ -f "$mem_list" -a grep "$word" "$mem_list" ]
then
echo "word already exists in list"
else
echo "word does not exist yet"
fi
也能收到[:参数太多!
请帮助我!