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.
resiprocate 之repro使用
2.
Ubuntu配置Github並且新建倉庫push代碼,從已有倉庫clone代碼,並且push
3.
設計模式9——模板方法模式
4.
avue crud form組件的快速配置使用方法詳細講解
5.
python基礎B
6.
從零開始···將工程上傳到github
7.
Eclipse插件篇
8.
Oracle網絡服務 獨立監聽的配置
9.
php7 fmp模式
10.
第5章 Linux文件及目錄管理命令基礎
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<