JavaShuo
栏目
标签
git换行符自动转换导致shell文件syntax error near unexpected token `$'\r''
时间 2020-12-27
标签
运维
shell
gitbash
linux
栏目
Git
繁體版
原文
原文链接
win7下git下载的shell文件在linux运行出错 执行cat -v **.sh 出现很多^M 原因 不同操作系统使用的换行符是不一样的。Unix/Linux使用的是LF,但Windows一直使用CRLF【回车(CR, ASCII 13, \r) 换行(LF, ASCII 10, \n)】作为换行符。而git入库的代码采用的是LF格式,它考虑到了跨平台协作的场景,提供了“换行符自动转换
>>阅读原文<<
相关文章
1.
shell脚本报错换行符syntax error near unexpected token \r
2.
syntax error near unexpected token shell
3.
运行脚本:syntax error near unexpected token `$'{\r'
4.
写shell,运行出错:syntax error near unexpected token `$’do\r”
5.
linux--shell错误:syntax error near unexpected token ‘('
6.
[Bash]syntax error near unexpected token 'then'
7.
Shell脚本执行报错:“syntax error near unexpected token ”
8.
syntax error near unexpected token `in解决方案
9.
syntax error near unexpected token `(' 异常解决
10.
脚本报错:syntax error near unexpected token
更多相关文章...
•
XSLT - 转换
-
XSLT 教程
•
C# 类型转换
-
C#教程
•
SpringBoot中properties文件不能自动提示解决方法
•
IntelliJ IDEA中SpringBoot properties文件不能自动提示问题解决
相关标签/搜索
换行符
换换
转换
换行
动换
换来换
syntax
简繁转换
进制转换
Git
Linux
Unix
Git 教程
R 语言教程
SQLite教程
文件系统
Git
Git GUI
0
分享到微博
分享到微信
分享到QQ
每日一句
每一个你不满意的现在,都有一个你没有努力的曾经。
最新文章
1.
字节跳动21届秋招运营两轮面试经验分享
2.
Java 3 年,25K 多吗?
3.
mysql安装部署
4.
web前端开发中父链和子链方式实现通信
5.
3.1.6 spark体系之分布式计算-scala编程-scala中trait特性
6.
dataframe2
7.
ThinkFree在线
8.
在线画图
9.
devtools热部署
10.
编译和链接
本站公众号
欢迎关注本站公众号,获取更多信息
相关文章
1.
shell脚本报错换行符syntax error near unexpected token \r
2.
syntax error near unexpected token shell
3.
运行脚本:syntax error near unexpected token `$'{\r'
4.
写shell,运行出错:syntax error near unexpected token `$’do\r”
5.
linux--shell错误:syntax error near unexpected token ‘('
6.
[Bash]syntax error near unexpected token 'then'
7.
Shell脚本执行报错:“syntax error near unexpected token ”
8.
syntax error near unexpected token `in解决方案
9.
syntax error near unexpected token `(' 异常解决
10.
脚本报错:syntax error near unexpected token
>>更多相关文章<<