• 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: "Mark J. Reed" <email@hidden>
  • Date: Sun, 03 Apr 2011 09:36:34 -0400

On Sun, Apr 3, 2011 at 7:12 AM, Christopher Stone
<email@hidden> wrote:
> Alright.  After much hacking around I've got something that seems to be
> working reliably, siphons off the SystemFlippers error, and uses only
> built-in Mac OS X tools.  I'd have preferred to grab the whole record for
> each ppc app, but I don't yet have enough chops with sed or AWK.

It would be tricky with sed.  It's doable with awk, though I find it
easier to think in Perl.

> 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?

Assuming yes, this one-liner should do the trick:

set ppcApps to paragraphs of (do shell script "system_profiler
SPApplicationsDataType | perl -lne 'print $1 if /Location: (.*)/ &&
$match; $match = ($1 eq 'PowerPC') if /Kind: (.*)/'")

--
Mark J. Reed <email@hidden>
 _______________________________________________
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: Christopher Stone <email@hidden>
    • 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>)

  • Prev by Date: Re: Why is all not all?
  • Next by Date: Re: Find all PowerPC Applications in Applications folder
  • 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