Alert boxes, part I
If you type
at a Terminal prompt, you’ll get a dialog box with a Cancel button. If you start adding words, as in
alert hello there you
you’ll get a box with several buttons. Phrases should be enclosed in quotes, as in
alert "Hello there" "What the heck" "is this?"
When you select a button, your selection is returned to the command line as stdout.
This is a great way to introduce an element of interactivity into your bash shell scripts.
Posted in Terminal
(comments are closed).