#!/usr/bin/env bash

set -e

APPLESCRIPT=`cat <<EOF
try
  tell application "Finder"
    set appname to name of application file id "com.kapeli.dash"
    return 1
  end tell
on error err_msg number err_num
  return 0
end try
EOF`

retcode=`osascript -e "$APPLESCRIPT"`
exit $retcode

#!/usr/bin/env bash

set -e

APPLESCRIPT=`cat <<EOF
try
	tell application "Finder"
		set appname to name of application file id "com.kapeli.dash"
		return 1
	end tell
on error err_msg number err_num
	try
		tell application "Finder"
			set appname to name of application file id "com.kapeli.dashdoc"
			return 1
		end tell
	on error err_msg number err_num
		try
			tell application "Finder"
				set appname to name of application file id "com.kapeli.dashbeta"
				return 1
			end tell
		on error err_msg number err_num
			return 0
		end try
	end try
end try
EOF`

retcode=`osascript -e "$APPLESCRIPT"`
exit $retcode

Check for all Dash bundle identifiers
Check for all Dash bundle identifiers