I have n files (call them input1, input2, and so on) with similar data and I wish to make a new file (call it out) that contains the 2nd column of these files. If I use
awk '{print $2}' input{1..n} >> out
then I get a single column with all the entries from the 2nd column of the input files. What can I do to have different columns for different files, as in $1
in out = $2
of input1, $2
in out = $2
of input2, $3
in out = $2
of input3,....., $n
in out = $2
of inputn?