files cross over

I have many files (File 1, File 2, File 3, ...) in same directory.
The format of all these files are same.
What I would like to do is to combine all these files into a single file via cross over.
Example)
>>File 1 look like this.
f1 01 1.0
f1 02 2.0
f1 03 3.0
f1 04 4.0
f1 05 5.0
f1 06 6.0
.
.

>>File 2 look like this
f2 01 21.0
f2 02 22.0
f2 03 23.0
f2 04 24.0
f2 05 25.0
f2 06 26.0
.
.

>>File 3 look like this
f3 01 31.0
f3 02 32.0
f3 03 33.0
f3 04 34.0
f3 05 35.0
f3 06 36.0
.
.

The result should look like this.
f1 1.0 2.0 3.0
f2 21.0 22.0 23.0
f3 31.0 32.0 33.0
f1 4.0 5.0 6.0
f2 24.0 25.0 26.0
f3 34.0 35.0 36.0
.
.

Thanks in advance.

Hi.

You can use command paste for this, but you need to tell it to use a newline (\n) rather than a TAB as a separator.

See man paste, experiment, and follow-up if you run into trouble ... cheers, drl

As drl suggested (this is the lazy way, you could make f1,f2 ... dynamic if you wish, and use parameter expansion instead of cut):

zsh 4.3.4% fgrep . file*
file1:f1 01 1.0
file1:f1 02 2.0
file1:f1 03 3.0
file1:f1 04 4.0
file1:f1 05 5.0
file1:f1 06 6.0
file2:f2 01 21.0
file2:f2 02 22.0
file2:f2 03 23.0
file2:f2 04 24.0
file2:f2 05 25.0
file2:f2 06 26.0
file3:f3 01 31.0
file3:f3 02 32.0
file3:f3 03 33.0
file3:f3 04 34.0
file3:f3 05 35.0
file3:f3 06 36.0
zsh 4.3.4% paste -d"\n" <(printf "f1 %s %s %s\n" $(cut -f3 -d" " file1))\
<(printf "f2 %s %s %s\n" $(cut -f3 -d" " file2))\
<(printf "f3 %s %s %s\n" $(cut -f3 -d" " file3))
f1 1.0 2.0 3.0
f2 21.0 22.0 23.0
f3 31.0 32.0 33.0
f1 4.0 5.0 6.0
f2 24.0 25.0 26.0
f3 34.0 35.0 36.0