I have a list of scripts
./myscript <param> | grep "asd"
./myotherscript <param> <param> > file
How can I automaticaly run another script when one of these command in the list is executed and finished?
There are multiple ways to automatically execute something after a specific command:
Create a function named after your specific command and execute the specific command afterwards. This is in my opinion the simplest and cleanest solution.
With zsh you can create a
Bash has the
If you are using bash and want to use something like