Shell script to get path of application in MacOS

0

Posted by Jaime | Posted in Tip | Posted on 10-08-2011

Tags: , , ,

Here is a shell script that finds an application on my hard drive using a nifty call to Finder using AppleScript:

#!/bin/sh
 
result=`exec osascript <<EOF
tell application "Finder"
	set thePath to (POSIX path of (path to application "Doxygen"))
end tell
EOF`
 
echo $result