I frequently execute from a shell (in my case Bash) commands that I want to fork immediately and whose output I want to ignore. So frequently in fact that I created a script (silent) to do it:
#!/bin/bash
$@ &> /dev/null &
I can then run, e.g.
silent inkscape myfile.svg
and my terminal will not be polluted by the debug output of the process I just forked.
I have two questions:
Is there an "official" way of doing this?, i.e. something shorter but equivalent to
&> /dev/null &?If not, is there a way I can make tab-completion work after my
silentcommand as if it weren't there ? To give an example, after I've typedsilent inksc, I'd like bash to auto-complete my command tosilent inkscapewhen I press[tab].
silentas a normal command, with normal tab completion available for that command. Sosilent git pus[TAB]would complete tosilent git push. – Chris Eberle Dec 8 '11 at 15:35