• 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
Re: Find all PowerPC Applications in Applications folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find all PowerPC Applications in Applications folder


  • Subject: Re: Find all PowerPC Applications in Applications folder
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 03 Apr 2011 16:32:25 -0500

Hey Mark,

On Apr 03, 2011, at 08:36, Mark J. Reed wrote:
> It would be tricky with sed.  It's doable with awk, though I find it easier to think in Perl.

Yes.  I had to use both sed and awk (at my skill level) to do what I wanted, although I really wanted to grab the whole record for each ppc application.  It would have been dead simple with pcre, and as usual Perl does the job quite neatly.

>> The script grabs the 'kind' through the 'location' fields from each ppc-app record;
>
> One concern, since you mentioned variable output - can we be sure that "kind" always precede "location" within a given record?

Yes.

Nice script.  I look forward to understanding Perl well enough to do such.

The system_profiler report looks like this:

Applications: # START-LINE

    TextEdit:

      Version: 1.6
      Last Modified: 06/29/2009 20:00
      Kind: Intel
      64-Bit (Intel): Yes
      Location: /Applications/TextEdit.app

    Maintenance:

      Version: 1.3.8
      Last Modified: 03/30/2011 13:15
      Kind: Universal
      64-Bit (Intel): Yes
      Location: /Users/chris/Downloads/2011-04-03-025923 (Gathered)/Maintenance.app

    ...

Given that how would you grab the whole record for each ppc app?  I'd think you could easily find on the whitespace-App-Name-:, discover the ppc kind, and wrap up with the location.

I can write a regular expression to do that, but I can't do it in basic Perl.

Thanks again.

--
Best Regards,
Chris _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Find all PowerPC Applications in Applications folder
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Find all PowerPC Applications in Applications folder (From: Ronald Hofmann <email@hidden>)
 >Re: Find all PowerPC Applications in Applications folder (From: Christopher Stone <email@hidden>)
 >Re: Find all PowerPC Applications in Applications folder (From: Ronald Hofmann <email@hidden>)
 >Re: Find all PowerPC Applications in Applications folder (From: Christopher Stone <email@hidden>)
 >Re: Find all PowerPC Applications in Applications folder (From: Ronald Hofmann <email@hidden>)
 >Re: Find all PowerPC Applications in Applications folder (From: Ronald Hofmann <email@hidden>)
 >Re: Find all PowerPC Applications in Applications folder (From: Christopher Stone <email@hidden>)
 >Re: Find all PowerPC Applications in Applications folder (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Getting rid of web page warning - Opening .html pages stored on drive -
  • Next by Date: Re: Very Irritating Open Handler
  • Previous by thread: Re: Find all PowerPC Applications in Applications folder
  • Next by thread: Re: Find all PowerPC Applications in Applications folder
  • Index(es):
    • Date
    • Thread