I was using awk yesterday, and I ran into a snag that forced me to use a spreadsheet to do the column manipulations. I'll explain, and then you can tell me what I should have done.
Ok, I have a file which has 3 columns, x, y, and z. I needed to edit the z-values, so I used awk to separate the file into 2 parts - an xy and a z. After editing the z values, I wanted to add them to the xy file, thus recreating the original xyz file with new z values. Reasons - I was using gedit to do a find-replace on the z, and didn't want to disturb the xy (this could have been done with a combination of grep and awk, but the find-replace seemed easier).
So
how can I take two columns from one file and add a third column from another file? Awk, being the one program that will always make *nix superior to Windows, no matter what, has got to be able to do this. I just don't know how.



