for i in (file1 file2 file3), do process_a $i | tee process_a $i_a.txt | process_b > $i_b.txt & done wait cat *_a.txt *_b.txt | process_c > final