Computing.Net > Forums > Unix > combining multiple files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

combining multiple files

Reply to Message Icon

Name: buddyx
Date: September 11, 2008 at 07:57:10 Pacific
OS: UNIX
CPU/Ram: DUO
Product: DELL
Comment:

I would like to edit the script given below, to combine the second collumn of FILE1, FILE2 FILE3 ...FILEN and produce an output in FILE

FILE1:
1 3
2 6
3 7
4 8


FILE2
11 33
21 65
13 73
41 68

FILE3:
31 31
92 61
83 17
54 18

BELOW is the script I found in previous threads, but i couldn't edit because i'm a complete beginner...

NR==FNR{
a[FNR]=$2
c=FNR
next}
{ for(i=1;i<=c;i++)
{ print a[i],$3 }}


Thank you in advance..




Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


How to remove spaces in f... Comparing two huge files



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: combining multiple files

nawk combining multiple files www.computing.net/answers/unix/nawk-combining-multiple-files/5100.html

Combine multiple files using awk www.computing.net/answers/unix/combine-multiple-files-using-awk/7591.html

gzip multiple files into one www.computing.net/answers/unix/gzip-multiple-files-into-one/7121.html