Linux Shell Select&Case第四行报错
本帖最后由 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: syntax error near unexpected token `in
'a.3: line 4: `case $mychoice in
    
              
                  shell
                  linux
              
------解决方案--------------------恭喜,接分。
------解决方案--------------------原脚本的第四行多加了`