I would like to use the linux cut command to extract a column from a file, and then use the paste command to paste the same column into the second file. I can do this by saving the results of the cut command and then running it and the second file. But it seems to me that for this you need to be one single-line, which does not imply the preservation of intermediate results. Does anyone know what this is? Thanks.
For example, the first file may look like
date weight 1-1-2010 weight1 1-2-2010 weight2 1-3-2010 weight3
and the second may look like
date blood_press 1-1-2010 bp1 1-2-2010 bp2 1-3-2010 bp3
and I would like to deduce how
date weight blood_press 1-1-2010 weight1 bp1 1-2-2010 weight2 bp2 1-3-2010 weight3 bp3
Needless to say, the data is much larger and more complex than that. But it gives an idea of ββwhat I need to do. Thanks again.
PS For reasons too detailed to include, the join command will not work.
source share