![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Remove the unwanted Blank Lines | Ariean | UNIX for Advanced & Expert Users | 5 | 01-28-2009 02:20 PM |
| Remove all blank lines in shell or awk. | tushar_tus | Shell Programming and Scripting | 1 | 10-13-2008 02:07 AM |
| remove blank lines in *.srt file :) | hungbp | UNIX for Dummies Questions & Answers | 10 | 02-16-2008 08:40 AM |
| How to count lines - ignoring blank lines and commented lines | kthatch | UNIX for Dummies Questions & Answers | 6 | 05-25-2007 01:21 AM |
| Remove blank lines | osymad | UNIX for Dummies Questions & Answers | 4 | 08-27-2005 06:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Shell script: Remove blank lines
Hi gurus,
I have this file with blank lines in it. How do i remove them in shell? I tried these commands but not working: sed '/^ *$/d' or sed '/^$/d' Anybody has a better idea pls? Also there are lines which starts with a single space, how do we remove the space in those lines? Thanks. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|