Created
December 16, 2013 07:10
-
-
Save ruseel/7983384 to your computer and use it in GitHub Desktop.
trailing space를 CR, LF를 그대로 두고 제거한다. 그리고 sed로 CR까지 제거한다.
This file contains 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
# ruby | |
removed = all.gsub /[\x20\t]+(\r)*$/, '\1' | |
# sed - CR을 제거한다. 짐작에 $가 LF만 매치되고 \s에 CR이 매치되는 듯 싶다. | |
sed -ri 's/\s+$//g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment