Skip to content

Instantly share code, notes, and snippets.

@idmontie
Created March 29, 2018 08:58
Show Gist options
  • Save idmontie/59bf25421b677a455ccb7a6668762d8a to your computer and use it in GitHub Desktop.
Save idmontie/59bf25421b677a455ccb7a6668762d8a to your computer and use it in GitHub Desktop.
Bash script to let you know when a command finishes
#!/bin/bash
# Add this file to your bash path
# Make sure to chmod 755 it
# Example useage:
# MY_COMMAND; beep
if [ "$?" = "0" ]; then
afplay /System/Library/Sounds/Submarine.aiff -v 8
else
afplay /System/Library/Sounds/Funk.aiff -v 8
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment