-
-
Save mlsteele/5b0162fc713becd938c278dd283e4aef to your computer and use it in GitHub Desktop.
Detach and silence output while running.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run a process silenced and disowned. | |
# Example Usage: ds firefox | |
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