Hacker News new | ask | show | jobs
by sheeeep86 2367 days ago
It's not fully automate, but I frequently find myself having to do a lot of one off shell tasks, which are not quite worth the effort of writing a bash script. While some command is running I would like to start enqueing the next command.

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...

4 comments

Might be worth it for you to just get better at bash. Use background jobs and "wait":

    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
Just use tmux and split your pane
I discovered ‘tsp’ last year and it worked great.
How about run-parts?