site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Aug 25, 2007, at 11:41 AM, Finlay Dobbie wrote: OK, well, that's an easy discussion: Don't do that. Q) What if I really want to parse command line output? A) I don't care. Don't do that. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Yes, but we were discussing the fragility of parsing tool output. If that's too terse of an answer, here's a little example Q&A session that elaborates: Q) But... Parsing command output is easier than writing C code which does the same thing through API calls! What do you say to that? A) Don't do that. Q) Isn't there some sort of tacit agreement to keep command-line output formats the same forever, as God and Dennis Ritchie intended? A) No. Don't do that. Q) What if I'm one of those scripting types who believes that compilers are an abomination? Can I parse command-line output then? A) No. Don't do that. Use Ruby, Python or Perl and some of the fine API shims they provide for doing such things. Q) Aren't you being just a tad inflexible about all of this? A) Yes, but you still shouldn't do that. We reserve the right to change command-line output at any time (sometimes it's not even us, but our upstream OSS providers) and when your scripts break, we'll both be sad and wishing you'd followed the advice in this Q&A. This email sent to site_archiver@lists.apple.com