4 ms·
https://unix.stackexchange.com/questions/572616/run-a-bash-command-when-a-process-is-done https://unix.stackexchange.com/questions/572616/run-a-bash-c... You c
by jolmg 6y ago
https://unix.stackexchange.com/questions/572616/run-a-bash-command-when-a-process-is-done https://unix.stackexchange.com/questions/572616/run-a-bash-c...
You can do that with the regular shell, just `^Z%; $next_command`, but I agree that nq might be more practical if that kind of workflow is done often.
- aidenn0 6y agoThat requires you still have the original shell open that ran the earlier commands; nq doesn't appear to have that limitation.
- jolmg 6y agoOk, that sheds light into the kind of workflow this might be useful in, like calling stuff from a launcher instead of a terminal or something like that and having them go through nq automatically. Personally, I would just keep the shell open, but options are cool.
- sickygnar 6y agonohup detatches the process from the shell
- aidenn0 6y ago...but doesn't queue jobs
- amelius 6y agoYou can use e.g. the "screen" utility to detach from a shell and later re-attach. I use this often: start something at work, detach, then go home, re-attach. You can have multiple sessions, give them names, etcetera.
- aidenn0 6y agoI'm well aware of screen/tmux/dtach/&c. If you accidentally exit the shell with all the jobs, you are done adding jobs to the queue, no?