3 ms·
Bash tip: you can schedule an arbitrary command to run when the current command completes by suspending it with CTRL-Z, and then typing "fg; <CMD>". (This does
by teraflop 10y ago
Bash tip: you can schedule an arbitrary command to run when the current command completes by suspending it with CTRL-Z, and then typing "fg; <CMD>".
(This doesn't seem to be documented specifically anywhwere, but it's implicit in the way bash's job control works.)
- riquito 10y agoWhich is identical to write "cmd; nextCommand" E.g. sleep 2; echo it works
- mynegation 10y agoI think the point of the tip was to show how it is done when process is already running and you forgot to add a command to be run immediately after