Deleting
Blank Lines Using AWK
Many times of output of some packages
contain lot of blank lines. You can remove those blank line using awk as
follows:
Assume that /tmp/test is the file containing
blank lines
cat /tmp/test | awk '$0!~/^$/ {print
$0}' > /tmp/test1
mv test1 test
Have a Unix Problem
Do
you have a UNIX Question?
Unix Books :-
UNIX Programming,
Certification, System Administration, Performance Tuning Reference Books
Return to : - Unix
System Administration Hints and Tips
(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.
Information used on this site is at your own risk.
All product names are trademarks of their respective
companies.
The site www.gotothings.com is in no way affiliated with
or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.
|