I am not an experienced Linux user. I am trying to select column data from 2 separate files and write to a third file using awk. I have tried to paste the files together i.e. paste file1 file2 and then awk but the data is appended on the next line (alternating).The data looks like this:file1HZ880   0.00 HAM86   1.13 HAM40   1.60 file2HZ880  -31.816826 115.757963   35.8909  0.0170  -.0170HAM86  -31.824923 115.761507   33.6108  0.0165  -.0165HAM40  -31.828528 115.762380   38.8434  0.0163  -.0163How do I create a new file with column2 (file1) and column4 (file2)?I have tried the following:paste ${LEV_IN1} ${LEV_IN2} | awk '{print $2,$4}' > ${TEMP2}where LEV_IN1 is file1 and LEV_IN2 is file2What am I doing wrong?
Using awk to select column data from separate files
awk