The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Removing 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
:
Removing Blank Lines
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
05-07-2008
hemangjani
Registered User
Join Date: Feb 2006
Posts: 73
You could run the following command:
sed
'/^$/d' < file1 > file2
file2 is the one without blank lines.
some of the version of
sed
allows '-i' switch to do in place. It saves the output in the same file.
hemangjani
View Public Profile
Find all posts by hemangjani
Find hemangjani's past nominations received
Find hemangjani's present nominations given