LoginSignup
0
0

More than 3 years have passed since last update.

行末コード(CR)[^M]を削除する方法

Last updated at Posted at 2021-01-18

Carriage Returns
\r
^M
を削除する方法

1つのファイルのみ

sed -i 's/\r$//g' <filename> 

カレントディレクトリ配下の全てのファイル

sed -i 's/\r$//g' $(find . -type f)

参考

指摘箇所修正しました。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0