Created
February 15, 2012 23:32
-
-
Save noprompt/1840041 to your computer and use it in GitHub Desktop.
Kill rails processes and a random number of passengers.
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
PROCESS_ID=`ps aux | grep rails | grep -v grep | cut -d ' ' -f3 | head -n 1` | |
if [[ -n "$PROCESS_ID" ]] | |
then | |
kill -9 $PROCESS_ID | |
echo "Derailing the train! $RANDOM passengers have died ..." | |
else | |
echo "No train in site." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment