Re: [OT] UNIX heads; can I do this?
Re: [OT] UNIX heads; can I do this?
- Subject: Re: [OT] UNIX heads; can I do this?
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 13 Jun 2007 17:59:31 -0400
On 6/13/07, Emmanuel <email@hidden> wrote:
while awk is cool when you have LF's in the first place,
Satimage osax may be faster for CR-separated files.
Awk will happily use any character as a record separator. As far as I
know, the internal code is the same, so there's no performance penalty
for using something other than linefeed.
Now of course it depends on what mission you have to perform with awk.
Indeed. And also on your degree of familiarity with the various tools
and your taste for expressiveness vs legibility.
Satimage can, with the rest of AppleScript, do pretty much anything.
It's a general programming tool.
Likewise Perl, which was originally sort of an "awk plus", and its
ilk: Python, Ruby, Tcl, Scheme...
All of the above can do anything awk can do. But if you're more
comfortable with awk, you should use awk.
You can also continue down the line. Just as perl can do anything awk
can do, awk can do anything sed can do, sed can do anything grep can
do, etc. But there's something to be sed for concision, too. "grep
foo" is shorter than "sed -ne /foo/p" or "awk '/foo/'" or "perl -ne
'print if /foo/'"...
--
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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden