Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Which is identical to write "cmd; nextCommand"

E.g. sleep 2; echo it works


I 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: