• 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 Array by Column X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort Array by Column X


  • Subject: Re: Sort Array by Column X
  • From: Steve Thompson <email@hidden>
  • Date: Mon, 26 Jul 2010 15:09:02 +0100


On 26 Jul 2010, at 14:40, Richard Lake wrote:

Not sure its possible to stipulate whether to ignore the first line of the csv file. 

No, but you can copy it out, sort everything that isn't the first line and then glue the two parts together

set formData to do shell script ("head -n 1 " & POSIX path of (path to scripts folder) as text) & "formdb.csv"
set formData to formData & (do shell script (("tr -d \\\" < " & POSIX path of (path to scripts folder) as text) & "formdb.csv" & " | tail -n +2 | sort -r -n -t , -k" & column & " "))

 _______________________________________________
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

  • Follow-Ups:
    • Re: Sort Array by Column X
      • From: Steve Thompson <email@hidden>
References: 
 >Sort Array by Column X (From: Richard Lake <email@hidden>)
 >Re: Sort Array by Column X (From: "Mark J. Reed" <email@hidden>)
 >Re: Sort Array by Column X (From: Richard Lake <email@hidden>)

  • Prev by Date: Re: Sort Array by Column X
  • Next by Date: "outgoing message" and "message" classes in Mail's AppleScript dictionary
  • Previous by thread: Re: Sort Array by Column X
  • Next by thread: Re: Sort Array by Column X
  • Index(es):
    • Date
    • Thread