How make bash script using osascript to close app from command line
When executed in Terminal, a command like the following will close the named, open, app:
osascript -e 'quit app "BBedit"'
I created the following bash script, in file closeapp.sh and made it executable (chmod a+x closeapp.sh).
#! /bin/bash
# gracefully close app
osascript -e 'quit app "$1"'
If I try it...
closeapp.sh BBedit
... then nothing happens.
What's wrong?