$ cat in.txt
january
february
march
april
abcd
$ cat -s in.txt
january
february
march
april
abcd
$ sed '/^$/N;/^\n$/D' in.txt
january
february
march
april
abcd
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
음 ..
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
답변감사합니다.
우선 답변 감사합니다. 남겨주신대로 해보니 잘됩니다.
답변에 in.txt 파일내용 복붙하면서 개행라인에 스페이스 들어간지도 모르고 안된다고 했습니다.
죄송합니다. ^^
답변감사합니다.
우선 답변 감사합니다. 남겨주신대로 실행해보았으나 멀티라인 개행문자가 없어지지는 않네요 ㅎ
혹시 테스트 하신 환경이 레드햇 계열 이신지요?
음 ..
빈 줄에 공백문자가 들어가 있다면 빈 줄로 인식되지 않을 겁니다.
마찬가지로 파일이 windows 형식(CR+LF) 일 때에도, 역시 빈 줄로 인식되지 않을겁니다.
되면 한다! / feel no sorrow, feel no pain, feel no hurt, there's nothing gained.. only love will then remain.. 『 Mizz 』
네 감사합니다.
여러모로 도움 주셔서 감사합니다. 덕분에 많은 것을 배우고 갑니다.
감사합니다. ^^
댓글 달기