同事反馈他在一测试服务器(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'",看半天没看出原因,上网查了半…