On Apr 02, 2011, at 03:36, Ronald Hofmann wrote: One question regarding the result. In some cases I get the 'location' of the app in question (see DivX Community) an in other cases I get 'Get Info String' (see Compressor) .
Example: -- DivX Community: Version: 1.1.0 Last Modified: 29.01.11 08:00 Kind: PowerPC 64-Bit (Intel): No App Store: No Location: /Applications/DivX/DivX Community.app -- Compressor: Version: 2.0.1 Last Modified: 16.08.08 07:46 Kind: PowerPC 64-Bit (Intel): No App Store: No Get Info String: Compressor version 2.0.1, Copyright 2002-2005 Apple Computer, Inc.
______________________________________________________________________
Hey Ronald,
Hmm. The answer for that is that I was tired last night when I wrote the script, so I just used 'grep':
grep -B4 -A3 PowerPC
'-B4' means print 4 lines before the match.
AND
'-A3' means print 3 lines after the match.
The trouble is that the 'record' for each of these applications is variable. On my system I looked and this was sufficient to reveal the location field of every record, but apparently on your system there is at least one record that has more fields that what I have.
For my own use I could rewrite this using the Satimage.osax in about 5 minutes to deal with the variable record lengths, but to make it portable I'll have to use 'sed' or 'AWK' (I'd use Perl, but I'm not quite there yet).
I'll hack around the problem this evening and see if I can come up with something more flexible, but if someone with more shell experience that I would like to take a stab - feel free.
-- Best Regards, Chris |