![]() |
|
|
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 |
| Removing Blank Lines | dhanamurthy | Shell Programming and Scripting | 3 | 05-08-2008 02:52 AM |
| How to count lines - ignoring blank lines and commented lines | kthatch | UNIX for Dummies Questions & Answers | 6 | 05-25-2007 02:21 AM |
| removing duplicate lines from a file | ocelot | UNIX for Dummies Questions & Answers | 4 | 01-25-2007 11:02 AM |
| Removing duplicate lines ignore case | hellsd | UNIX for Dummies Questions & Answers | 17 | 12-02-2004 10:47 AM |
| 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 |
|
|
|
||||
|
Sorry, it's still not right. Should test before I post. Apologies. Code:
awk '/^$/{ if (! blank++) print; next } { blank=0; print }'file
(What a grand way to increase my post count ...) |
![]() |
| Bookmarks |
| Tags |
| duplicates, truncation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|