FYI - regex to list installed WO frameworks
FYI - regex to list installed WO frameworks
- Subject: FYI - regex to list installed WO frameworks
- From: Kieran Kelleher <email@hidden>
- Date: Mon, 10 Sep 2012 15:29:25 -0400
[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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden