Retrieve Bundle ID

osascript -e 'id of app "/usr/local/MacGPG2/libexec/pinentry-mac.app"'
osascript -e 'id of app "Finder"'