![]() |
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 needed | nnayagam | Shell Programming and Scripting | 2 | 03-07-2008 06:34 AM |
| Little help needed. | Netghost | AIX | 5 | 08-10-2006 02:29 PM |
| Help needed | dsravan | Shell Programming and Scripting | 2 | 07-20-2006 09:37 AM |
| awk help needed. | cskumar | Shell Programming and Scripting | 0 | 07-20-2006 07:24 AM |
| Sed help needed | stevefox | Shell Programming and Scripting | 5 | 12-05-2005 01:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Help Needed in SED
Hi All ,
I have a input file which has set of lines like this :: cat a.txt unix1 djkdfkjdkkdfkdjfdfkjd 09191091 unix@unix.com <2008-23-07> unix 2 dfdfdfdfdfdfdfdfdfd unix3 dfldfljdflkjdfldfkljdfldjfl 0565606 unix1@unix.com <2008-10-09> unix4 dfdlfndfldflnlffddfd for some reason when i execute the SED command to bring it to single line , the code works partially sed '=' a.txt | \ sed '{ N s/\n/ / }' a.txt > b.txt the output is like this :: unix1 djkdfkjdkkdfkdjfdfkjd 09191091 unix@unix.com <2008-23-07> unix 2 dfdfdf dfdfdfdfdfdfd unix3 dfldfljdflkjdfldfkljdfldjfl 0565606 unix1@unix.com <2008-10-09> ~ can you help me how to bring all those lines into single lines my output should be something like this ::: unix1 and unix2 shoule be in a single line unix1 djkdfkjdkkdfkdjfdfkjd 09191091 unix@unix.com <2008-23-07> unix 2 dfdfdfdfdfdfdfdfdfd and unix3 and unix4 should be in single line ::: unix3 dfldfljdflkjdfldfkljdfldjfl 0565606 unix1@unix.com <2008-10-09> unix4 dfdlfndfldflnlffddfd |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|