• 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: Sorting IP addresses
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting IP addresses


  • Subject: Re: Sorting IP addresses
  • From: Emmanuel <email@hidden>
  • Date: Sat, 20 Dec 2003 18:05:08 +0100

At 12:23 AM +0800 21/12/03, Bill wrote:
>Marconi,
>
>An alternative: using the shell command "sort".
>
>Suppose a file records IP addresses, each in a new paragraph, with unix line ending, then you may try this one:
>
>-- choose the file
>set tmpPOSIX to quoted form of POSIX path of (choose file)
>-- brief explanation: using . as field seperator, sort field 0-3 numerically
>-- the first field is field 0, output the result to a file named "sortedIP.txt" on your desktop
>do shell script "sort -t. +0n +1n +2n +3n " & tmpPOSIX & " > ~/Desktop/sortedIP.txt"

And you say that only now? :-)

Thanks for that one!
Emmanuel
_______________________________________________
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: Sorting IP addresses
      • From: Deivy Petrescu <email@hidden>
References: 
 >Re: Sorting IP addresses (From: Bill <email@hidden>)

  • Prev by Date: Re: Sorting IP addresses
  • Next by Date: Match 'if' Condition and Do Nothing
  • Previous by thread: Re: Sorting IP addresses
  • Next by thread: Re: Sorting IP addresses
  • Index(es):
    • Date
    • Thread