[Just sharing a cryptic command so future me never forgets it :) ]

There might be a shorter, more efficient command, but anyway, this works. It 
lists WebObjects frameworks currently installed in your OS X 
/Library/Frameworks by looking for paths matching the pattern 
FRAMEWORKNAME.framework/Resources/Java/FRAMEWORKNAME.jar

(It should be all on one line)

find /Library/Frameworks -name *.jar | egrep 
"(.+).framework/Resources/Java/(\1).jar" | sed -E 
's/\/Library\/Frameworks\/([[:alnum:]]+[.]framework)\/Resources\/Java\/[[:alnum:]]+[.]jar/\1/'

I could have eliminated the egrep portion if I could have figured out how to 
get regex back-reference to the first group work in the search string.... but 
no success there, so egrep does that bit of logic before passing to sed. If 
anyone figures out a shorter version of this during your afternoon coffee 
break, send it back :)

-Kieran
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to