How to run a command after an already running, existing one finishes?
Problem
If I start a script that is going to take a long time, I inevitably realize it after I've started the script, and wish I had a way of doing some kind of alert once it finishes. So, for example, if I run: and press enter...how can I run another command once it finishes?
Error Output
really_long_script.sh
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: How to run a command after an already running, existing one finishes?
You can separate multiple commands by , so they are executed sequentially, for example: If you wish to execute next program only if the script finished with return-code 0 (which usually means it has executed correctly), then: If you want the opposite (i.e. continue only if current command has failed), than: You could run your script in a background (but beware, scripts output ( and ) would continue to go to your terminal unless you redirect it somewhere), and then for it: If you have already ru…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix