I'm writing a simple desktop initiation script which waits for disk idle, and then launches next external program (like Firefox, Skype or conky) using
ps cax | grep conky > /dev/null if [ $? -eq 0 ]; then echo "Conky is already running." else wait-for-disk-idle sda conky & fi
The problem is that some programs spew a lot of debug output to the terminal, which gets mixed with the messages produced by my initialization script.
The question: Is there any way to asynchronously launch an external program so that its standard output is discarded?
What I already tried:
conky & >/dev/null 2>/dev/null
bash -c conky &
The correct answer:
bash -c "conky >/dev/null 2>/dev/null &"