Skip to content

Instantly share code, notes, and snippets.

@usual-tools
Created February 18, 2014 02:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
# 改行コードを調べる (ファイルの先頭3行が表示)
cat -e try/layout/index.html | head -3
# 結果。
# 行末が $ であれば LF
# 行末が ^M$ であれば CRLF
# 行末が ^M であれば CR
# 改行コードを LF に変換する
nkf -Lu --overwrite try/layout/index.html
# 改行コードを CR+LF に変換する
nkf -Lw --overwrite try/layout/index.html
# 改行コードを CR に変換する
nkf -Lm --overwrite try/layout/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment