Re: Return character after sed
Re: Return character after sed
- Subject: Re: Return character after sed
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 24 Feb 2007 17:18:57 -0500
Seems like going through cut and sed is the wrong solution here... try this:
do shell script "date +%H.%M.%S -r $(sysctl -bn kern.boottime)"
That takes the raw boottime (seconds since Jan 1, 1970) and feeds it
as input to the date command, which lets you format it however you
want, in this case as hour.minute.second. Still has the trailing
newline, but you can get rid of it thus:
do shell script "echo -n $(date +%H.%M.%s -r $(sysctl -bn kern.boottime))"
incidentally, the man page for sysctl says that -b yields the raw
value, but it doesn't OMM; -n does. I supplied both options above...
your mileage may vary.
_______________________________________________
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