|
you can grab the columns using:
awk '{ print $1, $2 }' file_nm > file_nm_out
and combine ( up to 12 -- but some characters might get swallowed up )
the 2-column-output-files with paste:
paste file1 file2 > file_comb.1
However, with lots of files... this will become a little bit of a challenge.
I'm willing to bet there's an easier approach to your actual problem.
meaning -- why do the first 2 columns need to appear in a new file?
and how many files are we actually talking about?
what is the final destination for this data file we're building?
how were the initial files created in the first place?
it seems if we redesign any one of these steps, we might be able to design a better end-to-end process.
Perhaps you could restate the actual issue?
|