• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
FYI - regex to list installed WO frameworks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: FYI - regex to list installed WO frameworks
      • From: Bastian Triller <email@hidden>
  • Prev by Date: Re: adding a component to a D2W page
  • Next by Date: Re: WOWorkerThread deadlocks
  • Previous by thread: Re: EOStoredProcedure
  • Next by thread: Re: FYI - regex to list installed WO frameworks
  • Index(es):
    • Date
    • Thread