Re: SV: Return character after sed
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