Re: shell script and text manipulation
Re: shell script and text manipulation
- Subject: Re: shell script and text manipulation
- From: has <email@hidden>
- Date: Wed, 23 Feb 2005 20:33:30 +0000
Stevan Reese wrote:
I've had good success using sed/awk even with unicode.
Well, I didn't say traditional Unix tools couldn't be used - only
that they're not good for it. Unicode-savvy tools know what they're
looking at and will handle your data safely. Non Unicode-savvy tools
will simply treat your Unicode data as a mostly meaningless byte
stream, which makes it the user's responsibility to ensure they don't
screw up. For example, you can ignore encoding issues if all you're
doing is munging some line endings in a UTF8-encoded stream, but for
a more complex task like regex-based whole word matching you really
want a tool that understands what a 'word' actually is. Given the
choice between hand-holding a stupid tool or letting a smart one get
on with the job, I know which one I'd choose.
Seriously, anyone doing heavy text processing should just use Python,
Perl or Tcl. Faffing about with a kludgy mix of AppleScript and shell
is just a lot of unnecessary make-work. You can achieve much better
results for a fraction of the time and effort by using a language
that has proper text processing facilities already built in as
standard.
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
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