by sheeeep86 · 6y ago · 0 comments
Technically I could write one command like this and go get a coffee:
cd dir1 && task1 && cd ../dir2 && task2 some arg && etc
But then the task would only start executing when I'm done typing all commands... I want it to start task1 right away and then tkae my time to enter the rest...
do.sh stuff &
wait; do-other-stuff.sh -123 &
wait; cd ../; do-something-else.sh
It'll run the first command, when it's done it'll move on to the next one, etc. Use "jobs" to see jobs. Further reading: https://tldp.org/LDP/abs/html/x9644.html