chead sed to remove empty lines

This commit is contained in:
Carlos Peña 2013-08-31 12:46:33 +03:00
parent 4960f45f6f
commit 53a2a616d0

View File

@ -9,3 +9,6 @@ echo 'It is daytime' | sed 's/day/night/g'
# To remove leading spaces # To remove leading spaces
sed -i -r 's/^\s+//g' file.txt sed -i -r 's/^\s+//g' file.txt
# To remove empty lines
cat file.txt | sed '/^$/d'