|
How to extract a column from two different files in AWK?
Hi guys,
I need help in extracting one column of numbers from two different files and display it in a output file. In specific, I want to extrac the column no.2 ($2) from each file, file1.txt, file2.txt. Then place both extracted columns in a one file, out.txt.
the line command I use to call the AWK code and the files is this:
awk -f code.awk file1.txt file2.txt > out.txt
code.awk I have is (and is worng! ):
#Extracting columns
#
BEGIN {}
#{print $2 < file1.txt , $2<file2.txt}
END {}
I appreciate a lot your kind help,
solracq,
|