Removing all blank lines, leading and trailing blank spaces

Removing all blank lines, leading and trailing blank spaces :
#sed '/^$/d; s/^[ ]*//g; s/[ ]*$//g' prabhat.txt > kumar.txt

This command will create new file (kumar.txt) on which it removes blank lines, leading and trailing blank spaces.

Comments

Popular posts from this blog

How do I Use the Linux Top Command?

IOPS measurement