Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Two points' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Two points
Authored by: hayne on Jul 17, '06 08:34:48AM

1) While using "foo/rsrc" will work to access the resource fork of a file "foo", that usage is now deprecated. The recommended way is to use "foo/..namedfork/rsrc"

2) A simpler way to extract the desired info would be to use the 'strings' command followed by 'grep'. For example, the following works on my version of Office X:

strings "/Applications/Microsoft Office X/Microsoft Entourage/rsrc" | grep -A 1 CFBundleVersion



[ Reply to This | # ]
Re: better output
Authored by: thebug on Jul 17, '06 02:57:41PM

1) I didn't know that, though a quick google finds similar comments all over, and it works in Panther. Thanks.

2) While this works, it's not what I wanted, so I didn't do it. :-)

There's a difference in looking at the ARD UNIX results window and seeing:

11.2.5

and seeing:

<string>11.2.5</string>

You can see all the output if you want, but it'll only show you the last line in status window.

And yes, a few more piped unix commands, and you get some the same nice output. But ruby was easier (for me). And can be added to my ruby sysadmin lib.



---
Outside of a dog, a book is man's best friend. Inside of a dog, it's too dark to read.



[ Reply to This | # ]