(no title)
not_your_vase | 2 months ago
long-running-command &
pid_of_long_running_cmd=$(pidof long-running-command)
tail --pid=$pid_pf_long_running_cmd -f /dev/null && forgotten-command
Tail quits when $pid_pf_long_running_cmd disappears, and kicks off the forgotten-command. (It won't know however the exit code of the original cmd, so that's a drawback)
baobun|2 months ago
But along those lines yeah, it's basically the same as the "wait for it in another terminal" approach and I guess a solution would contain something similar.