Re: [OT] My life after AS: shell commands, perl?
Re: [OT] My life after AS: shell commands, perl?
- Subject: Re: [OT] My life after AS: shell commands, perl?
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 2 Dec 2005 16:40:47 -0500
I should add that I'm not recommending that the OP, or anyone really, set out to learn awk and sed - to say nothing of the multitude of even more specialized tools, like cut and coll and uniq and comm and so on. As I think my examples demonstrate, Perl can readily do everything they do in not much more typing, and learning one tool is a lot easier than learning three or a dozen. Just because we old codgers still reach for the smaller, more specialized tools in the box, that's no reason for you not to use your adjustable wrench, Leatherman, or Swiss Army Knife instead. :)
I only wished to point out that the specialized tools do still have some value, if only in concision (yeah, I know that's not a word). And you may at some point in the future find yourself exploring them. I had been using awk for years before I even found out about cut, for instance, but now I use cut whenever I'm dealing with a file whose lines are delimited by a specific character - again, to save typing. "cut -d: -f5" is shorter than "awk -F: '{print $5}' " (or "perl -F: -lane 'print $F[4]' ", for that matter). But beyond all the gazillion other capabilities awk has that cut doesn't (awk was in many ways the prototype for Perl), even for the simple column-selecting duties for which cut was designed, it has a limitation: it can't handle fields separated by arbitrary whitespace. Whereas identifying fields separated by arbitrary whitespace is awk's default mode. So I wind up using both.
But I wouldn't start out that way. :)
--
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:
This email sent to email@hidden