![]() |
|
|
|
|
|||||||
| 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 !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| delete traling blank lines only | visu | UNIX for Dummies Questions & Answers | 1 | 03-05-2008 05:09 PM |
| delete blank lines from a file | sachin.gangadha | UNIX for Dummies Questions & Answers | 2 | 12-04-2007 03:13 PM |
| Delete blank lines at the end of file | TL56 | Shell Programming and Scripting | 3 | 10-25-2007 12:44 PM |
| delete blank lines with sed | tmxps | Shell Programming and Scripting | 2 | 08-21-2007 04:01 PM |
| How to count lines - ignoring blank lines and commented lines | kthatch | UNIX for Dummies Questions & Answers | 6 | 05-24-2007 10:21 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
delete blank lines or lines with spaces only
hi there
i'm trying to delete blank lines and or lines with spaces only from a series of files in an directory. to do so, i'm using this: for files in `ls /users/myname/pesop* 2>/dev/null` do grep -v ^$ $files > newfile mv newfile $files done now, this works great for blank lines but doesn't work for lines with spaces. The number of spaces is uncertain. maybe it would be better with SED, but i dont know how to use it. can anyone help me? thanks |
| Forum Sponsor | ||
|
|
| Thread Tools | |
| Display Modes | |
|
|