The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
sed and blank lines
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
sed and blank lines
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
07-16-2008
Annihilannic
™
Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
Does it have to be
sed
?
Code:
grep -v '^[[:space:]]*$' infile > outfile
You could use a similar regexp in
sed
of course if you wished...
Annihilannic
View Public Profile
Visit Annihilannic's homepage!
Find all posts by Annihilannic
Find Annihilannic's past nominations received
Find Annihilannic's present nominations given