Suppressing Output of a Background Job using a Bash Sub Shell

When you execute a command as a background job, you will see the following behavior:

@$ mkdir test &
[1] 3900
[1]+  Done                    mkdir test

Now there are times when that output is undesirable. You can avoid it by executing the same command in a sub-shell. This is how you do it.

@$ (mkdir test &)

About Pratik Sinha

Linux Nerd, Socialist, Atheist, Adventuristic, Nature Lover, Geeky.

Leave a Reply