Skip to content

Instantly share code, notes, and snippets.

@ivanhuay
Created May 19, 2016 13:40
Show Gist options
  • Save ivanhuay/98e0757e030f52cca82db4415ef01f69 to your computer and use it in GitHub Desktop.
Save ivanhuay/98e0757e030f52cca82db4415ef01f69 to your computer and use it in GitHub Desktop.
#!/bin/bash
ERROR_FILE="$HOME/shell/error.log"
COMMAND="$1"
PARAMS="${@:2}"
FULL_COMMAND="$COMMAND $PARAMS"
$FULL_COMMAND 2>>$HOME/.silence/silence.log 1>/dev/null &
if [ $? = 0 ]; then
echo "$FULL_COMMAND running [$!]"
else
echo "Error"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment