![]() |
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 |
| delete traling blank lines only | visu | UNIX for Dummies Questions & Answers | 1 | 03-05-2008 09:09 PM |
| delete blank lines from a file | sachin.gangadha | UNIX for Dummies Questions & Answers | 2 | 12-04-2007 07:13 PM |
| regex to delete multiple blank lines in a file? | fedora | Shell Programming and Scripting | 6 | 10-11-2007 04:36 PM |
| delete blank lines with sed | tmxps | Shell Programming and Scripting | 2 | 08-21-2007 07: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 |
|
||||
|
Delete blank lines at the end of file
I am attempting to delete blank lines in my file and I've used this command:
sed '/^$/d' $file > $file.fixed all this seems to do is copy the file and not delete the blank lines located at the end of the file. Any assistance would be greatly appreciated. |
|
||||
|
I found this command and it worked for me:
sed '/^ *$/d' Thank you very much for responding and your assistance. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|