I want to make a script that extract two columns from file-1 and them write them into file-2. However, If file-2 already contains columns, and want the new columns to be written on the side (of the current columns), and not at the bottom. My current script appends the "new" columns at the bottom of the current ones, instead of doing it on the side. How can I add the new columns on the side a not at the bottom?. Someone suggested CSV module, and I tried, but I could not figure out how to do it.
Here is my current code
https://dl.dropbox.com/u/63216126/paula.txt
Here is the output file if I run the script once
https://dl.dropbox.com/u/63216126/try2.txt
Here is the output file if I run the script twice (Keep in mind this is not want I want)
https://dl.dropbox.com/u/63216126/try3.txt
Here is how I want the output to look after running the script three times
https://dl.dropbox.com/u/63216126/try.txt
Here are two input samples
https://dl.dropbox.com/u/63216126/file5.txt
https://dl.dropbox.com/u/63216126/file6.txt
I hope what I want to do is clear. Thanks a lot for the help.