[Tutor] how to join two different files

amrita at iisermohali.ac.in amrita at iisermohali.ac.in
Fri Jul 17 20:37:07 CEST 2009


Hi,

I have two large different column datafiles now i want to join them as
single multi-column datafile:--

I tried the command:------

>>> file('ala', 'w').write(file('/home/amrita/alachems/chem2.txt',
'r').read()+file('/home/amrita/pdbfile/pdb2.txt', 'r').read())

but it is priniting second file after first, whereas i want to join them
columwise like:---

FileA  FileB   FileC
12      14     12  14
15  +   16  =  15  16
18      17     18  17
20      19     20  19

What command I should use?

Thanks,
Amrita Kumari
Research Fellow
IISER Mohali
Chandigarh
INDIA



More information about the Tutor mailing list