Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using awk command to extract some datas. The point is that I need to use awk command several times to extract all informations I need and each time when I'm using awk I need create a temp file. My structure looks as below:

awk script1 output.txt > temp1.txt
awk script2 temp1.txt > temp2.txt
awk script3 temp2.txt > Final_output.txt
rm temp1.txt temp2.txt

Is there a way to eliminate the temp files? to execute several commands consecutively?

share|improve this question
Is there any reason that you can not use pipes? | – Hennes Nov 23 '13 at 16:27
no reason. I'm new in Linux and I didn't know that's possible;-) Pipes are working, you helped me a lot, thank You! – lucas Nov 23 '13 at 16:47
You might even go further and combine the awk scripts in a single one. – jlliagre Nov 23 '13 at 17:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.