Skip to content

Instantly share code, notes, and snippets.

@djwashburn
Created October 31, 2015 22:13
Show Gist options
  • Save djwashburn/87e5b1a59aec2a6b1078 to your computer and use it in GitHub Desktop.
Save djwashburn/87e5b1a59aec2a6b1078 to your computer and use it in GitHub Desktop.
A unix shortcut for running a GUI program in the background from the command line. Runs process in the background and redirects output.
#!/bin/bash
if [ -z "$1" ]; then # check if we have any arguments
echo usage: $0 command # if not, print a message and quit
exit
fi
nohup "$@" >/dev/null 2>&1 & # "$@" expands all the given arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment