今天写了个shell脚本,在自己机器上运行正常,给同事,运行报错syntax error near unexpected token `,左看右看shell脚本没有问题,没有办法google搜索,发现一位仁兄讲的挺好,内容如下: 用命令vi -b 打开你的SHELL脚本文件,你会.发现每行脚本最后多了个^M. 那么接下来就要搞清楚这个^M是什么东东? long long ago..... 老式的电传打字机使用两个字符来另起新行.一个字符把滑动架移回首位 (称为回车,<CR>,ASCII码为0…
原文:JS function document.onclick(){}报错Syntax error on token "function", delete this token - CSDN博客 JS function document.onclick(){}报错Syntax error on token "function", delete this token function document.onclick() //任意点击时关闭该控件//ie6的情况可以由…
同事反馈他在一测试服务器(CentOS Linux release 7.2.1511)上修改了/etc/profile文件后,使用source命令不能生效,让我帮忙看看,结果使用SecureCRT一登录就发现下面错误信息: Last login: Fri Nov 4 00:42:45 2016 from 10.20.34.14 -bash: $'\r': command not found -bash: $'\r': command not found -bash: $'\r': c…
#!/bin/bash #if program test echo 'a:' read a if [ "$a" = "English" ];then echo "right" else echo "wrong" fi 我是按照视频上的程序稍作修改写的shell脚本程序,结果执行时出现"syntax error near unexpected token `then'",看半天没看出原因,上网查了半…
http://blog.csdn.net/gongmin856/article/details/7690917 #!/bin/bash #if program test echo 'a:' read a if [ "$a" = "English" ];then echo "right" else echo "wrong" fi 我是按照视频上的程序稍作修改写的shell脚本程序,结果执行时出现“syntax erro…
执行shell脚本如果报如下错误: syntax error near unexpected token `$'\r'' syntax error: unexpected end of file $'\r': command not found 可能原因是写代码是编辑环境是window,或者Linux下的非Linux编码, 可以执行:dos2unix filename 来解决.…
使用场景:在spring data jpa下使用@Query("hql语句") 然后在项目启动的时候报错 hql语句报错:antlr.NoViableAltException: unexpected token: roleName 仔细查看了一下代码: @Query(value = "from Role as r left join r.department as d left join d.company as c where" + " (:depart…
---恢复内容开始--- [Linux]Shell脚本“syntax error: unexpected end of file”原因及处理 :::https://blog.csdn.net/u013948858/article/details/79637851 关于shell文件中出现syntax error: unexpected end of file https://blog.csdn.net/u011510825/article/details/50110373 ---恢复内容结束…
Syntax error on token "Invalid Regular Expression Options", no accurate correction 1.选中报错的jquery文件“jquery-1.2.6.min.js”.2.右键选择 MyEclipse-->Exclude From Validation .3.再右键选择 MyEclipse-->Run Validation 即可.…