Skip to content

Instantly share code, notes, and snippets.

@thislooksfun
Created February 21, 2017 01:54
Show Gist options
  • Save thislooksfun/b372df3d8e183279dd515f154d7c3ed5 to your computer and use it in GitHub Desktop.
Save thislooksfun/b372df3d8e183279dd515f154d7c3ed5 to your computer and use it in GitHub Desktop.
Small Bash script to gently quit applications from the command line
#!/bin/bash
if [ $# -eq 1 ]; then
echo "Quitting '$1'"
osascript -e "quit app \"$1\""
else
echo -e " Usage:\n gquit [Application Name]"
fi
@thislooksfun
Copy link
Author

Download the file and place it in a bin folder on your PATH (mine's in ~/bin), then run gquit <name>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment