![]() |
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 |
| help : crisis situation !! | Eisa | UNIX for Dummies Questions & Answers | 5 | 01-11-2008 03:17 AM |
| strange situation in file | arunkumar_mca | High Level Programming | 0 | 11-13-2007 06:09 AM |
| sed situation | Laurel Maury | Shell Programming and Scripting | 4 | 10-05-2006 01:19 PM |
| sed substitute situation | newbreed1 | UNIX for Dummies Questions & Answers | 16 | 06-03-2005 02:26 PM |
| current situation | joanne6298 | UNIX for Advanced & Expert Users | 2 | 08-06-2003 10:26 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to Sort a file for given situation?
Hi
All, How can you sort a file that is doubled space ( where even number lines are blank lines) and still preserves the blank lines? You can use grep,sed and regular expression. Thanks Vishal |
|
||||
|
Hmmm, I think you'll learn it better if you just try it out yourself. But:
/^$/ matches blank lines (beginning of line followed by end of line) d; deletes the line(s) that matched the pattern; starts a new command G adds a newline Good luck with the rest of your homework. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|