geermu
asked on
paste two outputs without using temp files
Current code
cmd1 > output1; cmd2 > output2; paste output1 output2 > output
rm output1 output2
Is it possibe to complish same thing without introducing the intermiate files.
Thanks.
cmd1 > output1; cmd2 > output2; paste output1 output2 > output
rm output1 output2
Is it possibe to complish same thing without introducing the intermiate files.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
one intermediate is better than 2.
I will accpet (or partially accept) it, unless some other better solution
Thanks lot.
I will accpet (or partially accept) it, unless some other better solution
Thanks lot.
are you stuck with a shell script? Do you have perl? It would take a few lines of perl to do something similar with no intermediate files.
ASKER
Not much experienc with perl.
awk may be possible?
awk may be possible?
You should be able to do
(cmd1;cmd2) | paste - - >output
(cmd1;cmd2) | paste - - >output
Ignore my last comment, the order is not want you want. kevinu's solution is the closest you can get.
I don't belive awk can do it.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. I splited the points
cmd2 >> output1