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.
gitlab新建分支後,android studio拿不到
2.
Android Wi-Fi 連接/斷開時間
3.
今日頭條面試題+答案,花點時間看看!
4.
小程序時間組件的開發
5.
小程序學習系列一
6.
[微信小程序] 微信小程序學習(一)——起步
7.
硬件
8.
C3盒模型以及他出現的必要性和圓角邊框/前端三
9.
DELL戴爾筆記本關閉觸摸板觸控板WIN10
10.
Java的long和double類型的賦值操作爲什麼不是原子性的?
本站公眾號
歡迎關注本站公眾號,獲取更多信息
相關文章
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
>>更多相關文章<<