Preventing bash from displaying “Done” when a background command finishes executing

bash

If I run a command in the background with &, like this:

sleep 2 &

when the command finishes, I get "Done". How I can avoid seeing the "Done" message ?

Best Answer

Run the command in a subshell:

(sleep 2 &)
Related Question