I have file test1 with lines like this:
A B C
D E F
...
and I want to have file test2 with lines:
DDD EEE FFF A
DDD EEE FFF D
...
where A and D are copied from first column of test1 file after phrase DDD EEE FFF to test2 file
I started like below,
cat test1 | echo "DDD EEE FFF " `awk '{print $1}'` > test2
but of course it only adds phrase DDD EEE FFF once and then appends A, D to it which is not what I want
DDD EEE FFF A D