tsar7117
大家帮忙看看 是哪里出错了。。。
大家帮忙看看 是哪里出错了。。。
#!/bin/bash
while true
do
read -n1 key
if [ "$key" = b || "$key" = B || "$key" = ^M || "$key" = ^H ]
then
free -m | awk '{print $3}' | >> free.txt;
else
continue
fi
done
tsar7117
这是 错误提示
a./aa.sh: line 5: [: missing `]'
./aa.sh: line 5: a: command not found
./aa.sh: line 5: a: command not found
./aa.sh: line 5: a: command not found
b./aa.sh: line 5: [: missing `]'
./aa.sh: line 5: b: command not found
./aa.sh: line 5: b: command not found
./aa.sh: line 5: b: command not found
B./aa.sh: line 5: [: missing `]'
./aa.sh: line 5: B: command not found
./aa.sh: line 5: B: command not found
./aa.sh: line 5: B: command not found