![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| delete blank lines from a file | sachin.gangadha | UNIX for Dummies Questions & Answers | 2 | 12-04-2007 07:13 PM |
| Delete blank lines at the end of file | TL56 | Shell Programming and Scripting | 3 | 10-25-2007 04:44 PM |
| regex to delete multiple blank lines in a file? | fedora | Shell Programming and Scripting | 6 | 10-11-2007 05:36 PM |
| delete blank lines with sed | tmxps | Shell Programming and Scripting | 2 | 08-21-2007 08:01 PM |
| delete blank lines or lines with spaces only | vascobrito | UNIX for Dummies Questions & Answers | 3 | 01-13-2004 07:36 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi,
I have blank line in the file, I just want to remove trailing blank lines. There are some blank lines between the lines, i don't want remove those. Just want to delete blank lines at the end. I used this command sed '/^$/d' infile > outfile, but it is not removing anything. I think this file has spaces and TABS in insted empty lines. so I used this command grep -v '^[[:space:]]*$' infile > outfile it removed blank lines at the end as well blank lines in middle. I dont want remove blank lines in the between the lines. Please help to solve this problem. Thanks, Visu |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|