Wednesday, May 6, 2009

Remove Blank lines from file

sed '/./!d' backupfilelist.txt > temp1.txt

sed '/^$/d' backupfilelist.txt > temp1.txt

grep -v '^   

filename.txt > temp1.txt


Tech 1 :   sed '/./!d' filename.txt > temp1.txt


Tech 2 :  sed '/^$/d' filename.txt > temp1.txt


Tech 3 :  grep -v '^$' filename.txt > temp1.txt


No comments:

sanjay's shared items

My Blog List