We Recommend

bash Cookbook: Solutions and Examples for bash Users bash Cookbook: Solutions and Examples for bash Users
bash Cookbook teaches shell scripting the way Unix masters practice the craft. It presents a variety of recipes and tricks for all levels of shell programmers so that anyone can become a proficient user of the most common Unix shell -- the bash shell -- and cygwin or other popular Unix emulation packages.


Posted By

zingo on 08/05/07


Tagged

Bash osx cli spotlight mdfind


Versions (?)


Who likes this?

1 person has marked this snippet as a favorite

iblis


List all application versions


Published in: Bash 


URL: http://harnly.net/2007/blog/geek/macosx/list-all-application-versions/

List the current version and installation date of every application on a OS X system, using of Spotlight.

  1. #!/bin/bash
  2. mdfind 'kMDItemKind == "Application"' | perl -ne 'chomp; print "\"$_\"\n" ' | xargs mdls -name kMDItemFSContentChangeDate -name kMDItemVersion -name k@MDItemDisplayName -name kMDItemPath | perl -pe 's/^\/.+/"-" x 20/e'

Report this snippet 

You need to login to post a comment.