I use the following command to extract 2nd column from table1.txt
and get output as output1.txt
awk '{ print $2 }' table.txt > output.txt
How to use loop for five files (table.txt
, abc.txt
, pqr.txt
, skt.txt
, mkt.txt
) to extract 2nd column in respective output files (out_table.txt
, out_abc.txt
, out_pqr.txt
, out_skt.txt
, out_mkt.txt
) ?