|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Concatenating 3 files into a single file
I have 3 files File1 Code:
C1 C2 c3 File 2 Code:
C1 c2 c3 File 3 Code:
C1 c2 c3 Now i want to have File1 as Code:
C1 c2 c3 I File2 as Code:
C1 c2 c3 O File3 as Code:
c1 c2 c3 D and these 3 files should be concatenated into a single file how can it be done in unix script? Last edited by Scrutinizer; 01-28-2013 at 08:43 AM.. Reason: code tags |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Please elucidate your data, for concatenate you can try paste command. Please use your delimeter as per your wish with -d option Code:
paste temp1.txt temp2.txt temp3.txt > temp4.txt |
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
Try: Code:
awk '{print $0,I}' I=I file1 I=O file2 I=D file3 |
|
#4
|
|||
|
|||
|
The case of the data in your source files and expected output does not match. Is this intentional?
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Concatenating Files In A Year/Month/Day File Structure | Grizzly | Shell Programming and Scripting | 3 | 09-11-2009 07:50 AM |
| Concatenating column values with unique id into single row | jsaravana | Shell Programming and Scripting | 17 | 08-26-2009 10:00 AM |
| Concatenating two files | Sriramprabu | Shell Programming and Scripting | 6 | 09-15-2008 11:33 PM |
| concatenating x files into a one... | Nicol | UNIX for Dummies Questions & Answers | 1 | 09-30-2004 08:13 AM |
|
|