Skip to content

Instantly share code, notes, and snippets.

@timvisher
Created March 10, 2016 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timvisher/b54f82eecdd3c9859aee to your computer and use it in GitHub Desktop.
Save timvisher/b54f82eecdd3c9859aee to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eu
set -x
path="${1:-}"
path="$(basename "$path")"
path="${path##.*}"
osascript -e 'id of app "'"$path"'"' | perl -ne 'chomp and print'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment