![]() |
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 |
| how to join lines | glamo_2312 | UNIX for Dummies Questions & Answers | 8 | 09-16-2008 05:17 AM |
| Join Every 5 Lines With $ Symbol | ntgobinath | Shell Programming and Scripting | 3 | 05-08-2008 11:01 AM |
| to join the corresponding lines using shell commands or awk | cdfd123 | Shell Programming and Scripting | 7 | 12-10-2007 04:45 PM |
| Awk Join multiple lines | hitmansilentass | Shell Programming and Scripting | 5 | 10-27-2006 12:04 PM |
| join two lines together | tine | Shell Programming and Scripting | 4 | 12-12-2003 12:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How can i join three lines into one in unix?
Hi all,
I am trying to merge three lines into one in my unix text file. My text file sis omething like this. Code:
xxxxxxxxx yyyyyyyyyyy zzz aaaaaaaaa bbbbbb ccccc Code:
xxxxxxxxx yyyyyyyyyyy zzz aaaaaaaaa bbbbbb ccccc Code:
awk '{printf $0 " "; getline; print $0}'
|
|
||||
|
Quote:
![]() It would be something like select bla bla update bla bla bla bla insert into bla bla and the resulting file must find "update" and then print that line and the next one altogether, like: select bla bla update bla bla bla bla insert into Any help would be great..... |
![]() |
| Bookmarks |
| Tags |
| merge, unix |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|