Created
June 3, 2018 16:36
-
-
Save south-str/d458b911d4c3fdf958346069db4071e7 to your computer and use it in GitHub Desktop.
CRLFをLFに置換し、LFで終わる連続した行を結合して1行にするsedスクリプト(Mac, BSD用)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
# 制御文字はダメっぽいので^Mで代用する | |
/^M$/!b loop | |
/^M$/s/^M//g | |
b done | |
:loop | |
N | |
/^M$/!b loop | |
s/\n//g | |
p | |
:done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment