Friday, March 11, 2016

tr: Squeeze Multiple Occurrences of Newline Characters

Command:
$ echo "test


test


test


test" | tr -s '\n'
Result:
test
test
test
test