TECH SOLUTIONS

Click here to edit subtitle

Forums

Post Reply
Forum Home > Unix Learnings > To View or Delete BLANK LINES from a File

Sourav Gulati
Site Owner
Posts: 83

1. To display or view blank lines:

Method 1:

$ grep ^$ filename

2.To remove or delete blank lines:

$ sed -i '/^$/d' filename

 



 

--


January 7, 2013 at 1:46 AM Flag Quote & Reply

You must login to post.