Skip to content

Instantly share code, notes, and snippets.

@qntmpkts
Created January 7, 2017 23:30
Show Gist options
  • Save qntmpkts/bc4956777ca97a01b355f719e822b99e to your computer and use it in GitHub Desktop.
Save qntmpkts/bc4956777ca97a01b355f719e822b99e to your computer and use it in GitHub Desktop.
Place this in your path to reliably launch any program from terminal into the background
#!/usr/bin/env sh
if test -t 1; then
exec 1>/dev/null
fi;
if test -t 2; then
exec 2>/dev/null
fi;
"$@" &;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment