当前位置: 技术问答>linux和unix
Linux Shell Select&Case第四行报错
来源: 互联网 发布时间:2017-03-30
本文导语: 本帖最后由 LightUpHeaven 于 2013-01-12 21:15:07 编辑 #!/bin/bash #aa.3 select mychoice in size information cfiles exit do case $mychoice in size) ls -s;; information) ls -l;; cfiles) ls *.c;; exit) exit 0;; esac done 运行bash aa.3 错误: 'a.3: line 4:...
#aa.3
select mychoice in size information cfiles exit
do
case $mychoice in
size) ls -s;;
information) ls -l;;
cfiles) ls *.c;;
exit) exit 0;;
esac
done
运行bash aa.3
错误:
'a.3: line 4: syntax error near unexpected token `in
'a.3: line 4: `case $mychoice in
|
原脚本的第四行多加了`
|
恭喜,接分。