• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: shell script and text manipulation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: shell script and text manipulation (From: "Reese, Stevan" <email@hidden>)

  • Prev by Date: Re: Aaaarrrggghhh XML!
  • Next by Date: Mutiple if and then for one value
  • Previous by thread: Re: shell script and text manipulation
  • Next by thread: Creating a folder in user preferences
  • Index(es):
    • Date
    • Thread