Quit
Quit 1.8
Your rating: Now say why...

(5) 4.8

Bash script to politely quit applications using Terminal.   Free
Add to my Watch List
Email me when discounted
Quit is an executable bash script to make it quick and easy to politely quit applications from the command line.

This script takes one or more application names as arguments, and uses osascript to tell each one to quit. Unlike kill and killall, this allows applications to save files and perform any necessary operations before exiting.
What's New
Version 1.8:
  • Better handling for saving untitled documents.
  • Minor fixes to the built-in help.
Requirements
Intel/PPC, OS X 10.5 or later







  • QuitsApps
    +3
Quit User Discussion (Write a Review)
ver. 1.x:
(5)
Your rating: Now say why...
Overall:
(5)

sort: smiles | time
burypromote

+21

Bottacco reviewed on 09 Oct 2013
This is a great CLI utility. It should be included in Darwin by default. Thank you to the developers for something useful and free.

Cheers from Spain,
[Version 1.8]


burypromote

+12

Kankei71 reviewed on 17 Jul 2011
Like it :)
What about 'quit all'?
[Version 1.6]

1 Reply

burypromote
Jon Stovell (developer) replied on 17 Jul 2011
Good idea.
burypromote

+51

Jerry Krinock reviewed on 26 Mar 2011
Thank you, Jon. Apple should have included this in Mac OS X. The 'open' command has been in since NeXTSTEP. Why not 'quit'?

Anyhow, I added an option '-f' which says to *not* print an error message if the requested app is not running. Following is the 'diff' output which shows the difference between Jon's original and mine. Users can add this option to the script using the 'patch' command on their Mac.

Basic tutorial:
http://www.linuxtutorialblog.com/post/introduction-using-diff-and-patch-tutorial

Intermediate tutorial:
http://www.linuxtutorialblog.com/post/introduction-using-diff-and-patch-tutorial

Here's the patch text, created by diff. I hope that MacUpdate's system doesn't munge it up.

22a23,25
> #
> # This is Jon's version 1.3, with the -f option added by
> # Jerry Krinock, 20110325
27c30
< echo "Usage: `basename "$0"` [-a] [-p] [-s|n] "
---
> echo "Usage: `basename "$0"` [-a] [-p] [-s|n] [-f] "
44a48
> echo " -f Do not print an error message if app is not running"
166c170,171
< while getopts "apns" opt
---
> ignoreNotRunning="false"
> while getopts "apnsf" opt
172a178
> f) ignoreNotRunning="true" ;;
206c212,215
< echo "No running application matches "$arg""
---
> if [[ $ignoreNotRunning == "false" ]]
> then
> echo "No running application matches "$arg""
> fi
[Version 1.3]


burypromote
-1

+143
Borlox commented on 05 Feb 2010
The script allows you to quit a GUI application remotely while optionally saving unsaved changes in open documents. While this sounds like a good idea, it should be used with caution. Over an SSH connection, you have no way of knowing the state of the document you're saving. Maybe, since you left the computer, your cat or your three-year-old has filled the document buffer with gibberish, which you're now going to save in place of the original.

A better plan would be never to leave open documents unsaved when getting up from the computer. Then you won't need this script. If you must quit an application remotely and you think it has unsaved changes, use Screen Sharing to view the document before saving it.
[Version 1.2]

1 Reply

burypromote
+2

+120
Sesquipedalian (developer) replied on 08 Feb 2010
If you are able to accomplish your objectives using Screen Sharing, then by all means use that tool. It has been useful to me more times than I can count.

However, there are all manner of usage scenarios where Screen Sharing may be an unavailable, undesirable, unnecessary, or just plain inapplicable tool. This script is intended to make life easier in such scenarios.

The -n option was designed to help address the situation in which one needs to quit a document-based app which may have been subject to attack by feline interlopers. But thinking about your comments has given me the idea to add an option to allow saving to a new file. I'll see if I can put that into the next version.
burypromote

+22

Ayub reviewed on 31 Aug 2009
Handy application for unix scripters.
[Version 1.1]


burypromote
-2

+45
Yukonjack commented on 30 Aug 2009
From the description:

"Bash script to politely quit applications using Terminal."

How do we find out which applications are currently using Terminal? And how do we know when an application uses Terminal? I'd like to know that before having a script quit any application that uses Terminal.
[Version 1.1]

1 Reply

burypromote
+2

+22
Ayub replied on 31 Aug 2009
"Using Terminal" means you can quit applications from withing Terminal. Normally to quit, say for example TextEdit, you simply will type 'quit TextEdit' and it will quit it. It quits the same way as you do by typing 'Command-Q' (fixme) for GUI apps. For quitting terminal apps didn't try it yet, but I guess for terminal apps 'killall' and 'quit' are equivalent (in most cases, fixme).
burypromote

+17

jichi reviewed on 21 Jul 2009
It works very well! I use kill before which is much less convenient. Thanks to the author! And wish more functions would be added in the future.

BTW, I found this app by accidence. why not add this good stuff to MacPorts? Hence more people will know and use it and make it better and better.
[Version 1.0]

2 Replies

burypromote

+120
Sesquipedalian (developer) replied on 20 Aug 2009
You are welcome! What sort of extra options do you imagine?
burypromote

+15
asmeurer replied on 26 Aug 2009
And fink too!
burypromote

+40
Blacksmith_tb commented on 14 Jul 2009
This is good in theory, but in practice, Quit refuses to quit anything I've tried (on 10.4.11). Neither the -a or -p flags seems to have any effect - I consistently get:

43:166: execution error: System Events got an error: Can't make every application process whose name = "Adium" or short name = "Adium" or title = "Adium" or displayed name = "Adium" into type reference. (-1700)
No running application matches "Adium"
[Version 1.0]

1 Reply

burypromote

+120
Sesquipedalian (developer) replied on 14 Jul 2009
I made a typo when I created this listing. It was supposed to say 10.5, not 10.4. I've corrected it now.
There are currently no troubleshooting comments. If you are experiencing a problem with this app, please post a comment.

There are currently no ratings. Write a comment or review now.

Downloads:26,312
Version Downloads:20,988
Type:Utilities : System
License:Free
Date:09 Oct 2013
Platform:PPC 64 / PPC 32 / Intel 64 / Intel 32 / OS X
Price:Free0.00
Overall (Version 1.x):
Features:
Ease of Use:
Value:
Stability:
Displaying 1-8 of 8
-
-
-
Please login or create a new
MacUpdate Member account
to use this feature
Watch Lists are available to
MacUpdate Desktop Members
Upgrade Now
Install with MacUpdate Desktop.
Save time moving files & cleaning
up space wasting archives.
Next time, install Quit with 1-click
Quit is an executable bash script to make it quick and easy to politely quit applications from the command line.

This script takes one or more application names as arguments, and uses osascript to tell each one to quit. Unlike kill and killall, this allows applications to save files and perform any necessary operations before exiting.