Websitetemplate.org

Welcome > Linux > sed Magic > sed: delete ALL blank lines from a file

sed: delete ALL blank lines from a file

(same as "grep '.' ")
sed '/^$/d' # method 1 
sed '/./!d' # method 2 

Content Copyright 2003-2014 George Toft