Skip to content

Instantly share code, notes, and snippets.

@rcaldwel
Created July 31, 2012 02:59
Show Gist options
  • Save rcaldwel/3213143 to your computer and use it in GitHub Desktop.
Save rcaldwel/3213143 to your computer and use it in GitHub Desktop.
bash: unix: applescript: set a bash var to the output of a scpt
the_app=$(
osascript 2>/dev/null <<EOF
tell application "System Events"
name of first item of (every process whose frontmost is true)
end tell
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment