Update sed

This commit is contained in:
James Zhu 2014-09-06 20:42:49 +08:00
parent 28478ff257
commit 75fab5231f

View File

@ -12,3 +12,6 @@ sed -i -r 's/^\s+//g' file.txt
# Remove empty lines and print results to stdout: # Remove empty lines and print results to stdout:
sed '/^$/d' file.txt sed '/^$/d' file.txt
# replace newlines in multiple lines
sed ':a;N;$!ba;s/\n//g' file.txt