Skip to content

Instantly share code, notes, and snippets.

@bored-engineer
Created January 29, 2012 20:12
Show Gist options
  • Select an option

  • Save bored-engineer/1700430 to your computer and use it in GitHub Desktop.

Select an option

Save bored-engineer/1700430 to your computer and use it in GitHub Desktop.
sbalert sample script
#!/bin/bash
sbalert -t "sbalert" -m"This is a test alert." -d"Button 1" -a"Button 2" -o "Cancel"
result=$?;
if [[ "$result" == "0" ]]; then
echo "Button 1 was pressed"
elif [[ "$result" == "1" ]]; then
echo "Button 2 was pressed"
elif [[ "$result" == "2" ]]; then
echo "Button 3 was pressed"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment