Pages

Tuesday, March 19, 2013

Write a script to delete the blank lines ?


$vi blank_lines.sh
echo “enter a filename to delete “
read fname
grep -v “^$” $fname >temp
mv temp $fname
echo “after deleting the lines”
cat $fname
:wq

No comments:

Post a Comment