• 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: SV: Return character after sed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SV: Return character after sed


  • Subject: Re: SV: Return character after sed
  • From: Axel Luttgens <email@hidden>
  • Date: Sun, 25 Feb 2007 14:52:54 +0100

On 25/02/07 14:28, email@hidden wrote:

Mark,

"Your milage may vary", Thats one thing for sure. I learn that every time I post a question here. In the end what I am looking for is an Applescript date and I modified your line like this:

set myCheckInDate to date (do shell script "date -r $(sysctl -n kern.boottime) +%Y/%m/%d/%H.%M.%S")

but I am sure there is more clean way to turn the boottime into an AS date.


You might be right. ;-)

If your ultimate goal is to get the boot time as an AppleScript date, let's try to let AS do the job.

From the discussion, we already now that this shell command
sysctl -n kern.boottime
yields an integer.
In fact, that integer is the boot time expressed as the number of seconds since Jan 1st, 1970 (aka the "epoch").


So, this AppleScript command

   (date "1/1/1970") + (do shell script "sysctl -n kern.boottime")

should just provide you with the required AppleScript date.

HTH,
Axel

_______________________________________________
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: SV: Return character after sed
      • From: Emmanuel <email@hidden>
References: 
 >Return character after sed (From: <email@hidden>)
 >Re: Return character after sed (From: "Mark J. Reed" <email@hidden>)
 >Re: Return character after sed (From: "Mark J. Reed" <email@hidden>)
 >SV: Return character after sed (From: <email@hidden>)

  • Prev by Date: Re: Return character after sed
  • Next by Date: Re: SV: Return character after sed
  • Previous by thread: SV: Return character after sed
  • Next by thread: Re: SV: Return character after sed
  • Index(es):
    • Date
    • Thread