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: 


wKioL1kmVbqSegm-AAAw8f36tDE553.png-wh_50


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:

 wKiom1kmVjuBS0nhAAAM63NFlgU277.png-wh_50

Choose File | Line Separators on the main menu, and then choose the desired line ending style from the sub-menu.