用pycharm 編寫shell時,有時會因爲行分隔符導致在Linux無法正常運行
解決方法:
以下是官網內容
To set up line separators for new files
In Settings, click Code Style.
From the Line separator (for new files) drop-down list, select the desired line separator style:
Apply changes and close the dialog.
To view line ending style for the current file
Open the desired file in the editor, as described in the section Opening and Reopening Files.
View the Status bar: the current line endings style is denoted by the dedicated icon with the specified style, for example, .
To change line separator for a file, currently opened in the editor
Open the desired file in the editor, as described in the section Opening and Reopening Files.
Do one of the following:
Click the line separator spin box in the Status bar, and choose the desired line ending style from the pop-up menu:
Choose File | Line Separators on the main menu, and then choose the desired line ending style from the sub-menu.