• 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: 'sort' command-alternative?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'sort' command-alternative?


  • Subject: Re: 'sort' command-alternative?
  • From: bill fancher <email@hidden>
  • Date: Sat, 5 Oct 2002 12:11:58 -0700

On Friday, October 4, 2002, at 03:00 PM, Shane Stanley wrote:

On 5/10/02 5:24 AM +1000, bill fancher, email@hidden, wrote:

The above doesn't address the problem noted by Randal L. Schwartz
concerning breakage when process names contain single quotes. That's
not just a Perl thing.

BTW, the following fixes the problem with single quotes. The quoted form property is made for this sort of thing.

set text item delimiters to (ASCII character 10)
tell application "Finder" to set theList to name of processes as string
set text item delimiters to {""}
do shell script ("echo " & quoted form of theList & "| sort -f")

Is it Unicode happy (as in AS's Unicode text)?

I've been hoping some Unicode expert would answer. AFAIK sort isn't Unicode happy, at least in the sense that it doesn't correctly recognize a string in two different encodings, or with two different "spellings", as being the same. But in this particular case, Finder screws things up before sort gets a chance to.

For general Unicode happy utilities, I'd look at Tcl, Python, or Perl. The "traditional" stuff is pre-Unicode, though there are doubtless command line tools available somewhere.

I suspect you may know more about this than I do (it wouldn't take much).

--
bill the monoglot
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: 'sort' command-alternative?
      • From: John Delacour <email@hidden>
    • Re: 'sort' command-alternative?
      • From: Shane Stanley <email@hidden>
References: 
 >Re: 'sort' command-alternative? (From: Shane Stanley <email@hidden>)

  • Prev by Date: URL Access - post data
  • Next by Date: NowContact 4.2.5 (OS X 10.2) to Apple Address Book for FaxSTF
  • Previous by thread: Re: 'sort' command-alternative?
  • Next by thread: Re: 'sort' command-alternative?
  • Index(es):
    • Date
    • Thread