• 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: Is this legit? [POSIX]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is this legit? [POSIX]


  • Subject: Re: Is this legit? [POSIX]
  • From: "Nigel Garvey" <email@hidden>
  • Date: Fri, 25 Jul 2008 22:42:31 +0100

"Mark J. Reed" wrote on Fri, 25 Jul 2008 09:19:54 -0400:

>>  -- "perl". (Faster than "ls"):
>>  set tz to (do shell script "perl -le 'print readlink(\"/etc/
>> localtime\")' | cut -d / -f 5-")
>>  -- Or, faster:
>>  set tzPath to (do shell script "perl -le 'print readlink(\"/etc/
>> localtime\")'")
>>  set astid to AppleScript's text item delimiters
>>  set AppleScript's text item delimiters to "zoneinfo/"
>>  set tz to text item 2 of tzPath
>>  set AppleScript's text item delimiters to astid
>>  tz
>
>Interesting.   Wonder if it would be faster to do all the parsing in Perl:
>
>do shell script "perl -le 'print( readlink(\"/etc/localtime\") =~
>m{zoneinfo/(.*)} )' "

Yes it is. Just. Thanks, Mark.  :)

NG

 _______________________________________________
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

  • Prev by Date: Re: iCal moving events to calendar not working
  • Next by Date: Re: replacing embedded images in Illustrator
  • Previous by thread: Re: Is this legit? [POSIX]
  • Next by thread: how do I retrive a podcast's URL
  • Index(es):
    • Date
    • Thread