![]() |
| | #1 |
| Registered User Join Date: Aug 2009
Posts: 11
| Can anyone tell me if there is an unix utility to join two consecutive lines ? ex: $ cat file a 1 b 2 c 3 output should be : a 1 b 2 c 3 Thanks, 14341 |
| 14341 is offline | |
| | #2 |
| Registered User Join Date: Oct 2009 Location: While(1)
Posts: 316
| use editor like vim or emacs (i use this) can't think of any direct utility from shell |
| RockyMarrone is offline | |
| | #3 | |
| Registered User Join Date: Aug 2009
Posts: 11
| Quote:
Dude i don't want to do it manually. As a work around a c/cpp program can be written which can do the job. But i just want to know if i can achieve this with inbuilt unix tools or not. Thanks, 14341 | |
| 14341 is offline | |
| | #4 |
| Registered User Join Date: Aug 2009
Posts: 11
| Is there any possibility to solve the above problem using awk? |
| 14341 is offline | |
![]() |
| Tags |
| linux, shell, unix |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Printing "shapes" based on character lines and number of line inputs | matt_570 | C++ Programming | 11 | 10-07-2008 06:19 PM |
| Print out first N lines | YoYayYo | C Programming | 1 | 02-21-2008 12:58 AM |
| First Consecutive composites Help | ch4 | C Programming | 10 | 11-23-2007 04:55 PM |
| Line Counting | 00Sven | C Programming | 26 | 04-02-2006 08:59 PM |
| display 10 consecutive lines........... | imbecile in C | C Programming | 6 | 07-09-2003 07:37 PM |