I’m testing something where I’m compiling some code and analysing output with a Perl script.
So first I run make, manually copy & paste the output to errors.txt and then running my Perl script (running: perl analysis.pl) in terminal.
Is there away I can do this just with one line in bash?
You can do:
We are redirecting the
stdoutandstderrofmaketo a file called error.txt and then irrespective of the make success or failure we are running thePerlscript( which knows to read fromerror.txt)If you want the Perl script to be run only when
makesucceeds you can use&&in place of;