Join command

Dear Experts,

I have several (say 'm') text files, each with 'n' columns. I want to put them into a large single file with n*m columns.

 
a 1             a 1             a 1         a 1                          
b 2             b 5             b 1         b 3
c 3             c 7             c 1         c 4
d 4             d 8             d 1         d 7

give the output

a 1 1 1 1
b 2 5 1 3
c 3 7 1 4
d 4 8 1 7

before i have used the join comand to do this

join file file1 | join - file2 | join - file3 

however this time i have 300 files to join so was wondering if the was an easier way to do this then writing out all the files to the command line

Kindest Reagrds

M

join is used to join lines that beginn with the same tag a-d in your example. when you plan to glue
800 files line for line it may be better to write a small shell/awk/perl/you name it scipt that opens
800 files an generates the output you want.

but ... this depends

  • how many lines per file
  • how often you need to perform that,
  • how compilcate it is to find the line
  • how much space (hard/core) and speed does the target have