I wanted to see if this was feasible. I'd like to execute two separate bash commands, where the second command needs to take the output of the first command as an input. Both commands would need to generate an output file as well. Is this possible to do in a single subprocess call? I'd like to combine this with psrecord
and have both commands graphed in the same plot, which is why I'm trying to combine them:
psrecord 'program --arg1 foo --arg2 bar --output out1.txt && program out1.txt --arg3 baz --output out2.csv' --log activity.txt --plot plot.png
Apologies if this question has been asked before; I know there have been posts about executing multiple bash commands, but I'm more concerned about the 2 output files, passing the first output to the second command, and being able to record both commands in one psrecord graph. Thank you in advance for your help.