to create an output file as a table

Hi,
I have four input files and would like to create an output file as a table. Please check the example below.

File 1.

111111
222222
333333
444444

File 2.

555555
666666
777777
888888

File 3.

aaaaa
bbbbb
ccccc
ddddd

File 4.

eeeee
fffff
ggggg
hhhhh

Output file.

-----------------------------
Gtt_1  | Gtt_2  | SPCa | SPCb
-----------------------------
111111  555555  aaaaa  eeeee
222222  666666  bbbbb  fffff
333333  777777  ccccc  ggggg
444444  888888  ddddd  hhhhh

Does anybody know how to do that ? My distro is IBM AIX 5.

Regards.

echo "-----------------------------
Gtt_1 | Gtt_2 | SPCa | SPCb
-----------------------------" > output 
paste file1 file2 file3 file4 >> output
1 Like

Hi rdcwayx,

Your hint worked really great. Thanks a lot.
Let me know if I can help you one of these days ...
Regs,
Marcelus.