[Tutor] extracting a column from many files

Bala subramanian bala.biophysics at gmail.com
Mon Feb 23 10:35:42 CET 2009


>
>
> file1:
> 1a1     1b1     1c1     1d1     1e1     1f1
> 2a1     2b1     2c1     2d1     2e1     2f1
> 3a1     3b1     3c1     3d1     3e1     3f1
>
> file2:
> 1a2     1b2     1c2     1d2     1e2     1f2
> 2a2     2b2     2c2     2d2     2e2     2f2
> 3a2     3b2     3c2     3d2     3e2     3f2
>
> How do you want the output files to look like?
>

I want to extract  1a1 2a1 3a1 from file 1, similarly 1a2 2a2 3a2 from file
2 ( same columns) and then make a new output file of the following format

1a1 1a2 ---
2a1 2a2 ---
3a1 3a2 ---

Similarly for the 2nd, 3rd, 4th..columns in the input files.

Thanks,
Bala
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090223/34594a6a/attachment.htm>


More information about the Tutor mailing list