つかいかた
appopen -e
#! /bin/bash function usage() { echo "Usage : ${0} [option]" echo "" echo " アプリケーション実行ショートカット" echo "e emacs" echo "a activity monitor" echo "g google chrome" echo "" exit } while getopts ":eag" opt do case ${opt} in e) APPLICATION="Emacs";; a) APPLICATION="Activity Monitor";; g) APPLICATION="Google Chrome";; \?) usage ;; esac done /usr/bin/osascript -e "tell application \"${APPLICATION}\" to activate"