Shell编程笔记——Syntax error: "(" unexpected
来源:互联网 发布:iphone vr软件 编辑:程序博客网 时间:2024/05/17 04:21
参考网页:
http://ask.chinaunix.net/question/974
http://bbs.csdn.net/topics/390132876
问题描述:
假如我们在shell文件定义了一个数组pid=(0 0 0 0),运行文件后则会收到报错:Syntax error: "(" unexpected。
原因
主要是因为Linux系统shell版本不兼容引起的。 shell的版本有sh,ksh,csh, bash,dash……等等。用命令ls -al /bin/sh可以得到我们当前所用的Linux系统的shell属于何版本。
解决:
通过将当前通过以下方式可以使 shell 切换回 bash:
$sudo dpkg-reconfigure dash
然后选择 no 或者“否 ”,并确认。这样做将重新配置 dash,并使其不作为默认的 shell 工具。
0 0
- Shell编程笔记——Syntax error: "(" unexpected
- shell编程—syntax error near unexpected token
- shell---shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell编程报错:“syntax error near unexpected token `”
- shell:syntax error:unexpected end of file
- shell syntax error near unexpected token
- syntax error near unexpected token shell
- Shell:syntax error near unexpected token
- syntax error near unexpected token 和 Linux Shell syntax error: unexpected end of file
- syntax error: unexpected identifier
- syntax error, unexpected $end
- 如果缘识,是一树花开
- C# WCF 03 简单的IIS寄宿
- 我的爱百度搜不到
- lhnfw邻淹fOcEke
- 关于Python中的for循环控制语句
- Shell编程笔记——Syntax error: "(" unexpected
- 设计模式------工厂三姐妹
- yii 插入多条数据
- 如平静的水面,波澜不惊
- 【数据结构】单链表的建立,测长,打印,删除,插入, 排序, 逆置
- 为git设置代理
- acm 投简历
- JSONKIT中的isa废弃兼容
- response的Writer输出数据的问题输出中文的乱码问题