Checking version of Applications installed in ~/Applications with unknown username

Posted by ridogi on Super User See other posts from Super User or by ridogi
Published on 2013-07-01T00:02:39Z Indexed on 2013/07/01 10:24 UTC
Read the original article Hit count: 202

Filed under:
|
|
|
|

I'd like to check the version of Firefox through Apple Remote Desktop of all managed computers. I have written this, but it only checks for Firefox in /Applications

/bin/cat /Applications/Firefox.app/Contents/Info.plist | grep -A 1 CFBundleShortVersionString | grep string | sed 's/[/]//' | sed 's/<string>//g'

For standard users Firefox auto update breaks if it is in /Applications so I instead have it installed in ~/Applications

I'd like to check that copy (if it exists), but I can't specify the path in the command since it is unique to each computer. For example:

/Users/jon/Applications/Firefox.app

/Users/arya/Applications/Firefox.app

Presumably I want to use find and pipe the result to my command. This should work for 10.6 through 10.8

© Super User or respective owner

Related posts about osx

Related posts about command-line