Quickzi: How to remove blank lines and comments from a file
Thursday, November 1st, 2007 at
7:06 am
Heres a quick tip on removing blank lines and comments from a file using sed.
sed ‘/ *#/d; /^ *$/d’ file_with_blank_lines_and_comments.txt > new_file_without_blank_lines_and_comments.txt
Cheers!
Popularity: 4% [?]
Tagged with: HowTo • Linux • quickzi • tips
Like this post? Subscribe to my RSS feed and get loads more!













Leave a Reply