Re: [OT] Shell scripting
Re: [OT] Shell scripting
- Subject: Re: [OT] Shell scripting
- From: "John W. Baxter" <email@hidden>
- Date: Fri, 26 Dec 2003 08:51:26 -0800
- Envelope-to: email@hidden
On 12/26/2003 0:30, "Marc K. Myers" <email@hidden> wrote:
>
Being a complete novice at shell scripting I can't figure out how to
>
add the date and time to the message my script sends to the console.
>
Can someone tell me how to do that? Setting a variable to the output
>
of a date command ought to be easy but my references don't tell me how
>
to do it.
Change the echo command to something along these lines (watch line
wrapping):
echo "AppleFileServer restarted by autoAfpCheck at `date +%H:%M\ on\
%Y-%m-%d`"
Which gives
AppleFileServer restarted by autoAfpCheck at 08:46 on 2003-12-26
man strftime
will reveal the various codes you could use instead of what I used.
--John
_______________________________________________
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.