LoginSignup
23
10

More than 5 years have passed since last update.

ファイル末尾の改行コードを削除する

Posted at

vim

: set binary noeol

これを実行してから保存する

Ruby

$ echo -ne 'ABC\nDEF\n' | ruby -0777 -ne 'print $_.chomp("")'

※こちらのページを参考にさせていただきました。
http://d.hatena.ne.jp/zariganitosh/20131216/end_of_file_lf_control

本当は

sedなどのLinuxのコマンドでやりたかったが、上手くいかず。

うまい方法をご存じの方、ぜひ教えていただきたいです。

23
10
3

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
23
10