Re: Find all PowerPC Applications in Applications folder
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