|
|
Sort lists in AppleScript using the Unix sort command
Somebody could earn a pretty penny from me by providing some cool shell scripts for use with text munging in AppleScript. AS is great for pushing apps around, but text and database stuff is way too for it.
Here's one of my faves:
Friend Gnarlodious tipped me off to the sed stuff. Yeah.
Mentioned here not long ago was "Wicked Cool Shell Scripts" by Dave Taylor. Good stuff there, too.
search-and-replace with sed
replace
with
(there's only one additional g near the end) and you can get rid of that repeat loop entirely. "g" stands for global and means sed should replace every occurance off the search string in the input line. That will make the script much faster, too.
Sort lists in AppleScript using the Unix sort command
I highly recommend Satimage.osax extension for text manipulation including text replacement according to a regular expression http://www.satimage.fr/software/en/dictionaries/dict_satimage.html
Sort lists in AppleScript using the Unix sort command
I have to agree about the Satimage osax - I use one or another of its commands in almost every applescript I write. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|