thanks

Eric Crist wrote:
On Nov 9, 2007, at 11:46 AM, Bill Banks wrote:

I'm writing a backup script. I need to get the day of the week into a variable. How can I do it?

Well, it depends on what you're using. If you're using sh, see `man date`. If you're using perl, it's quite complicated.

In short, with sh, simply use the built-in date command:

#!/bin/sh
weekday=`date "+%A"

See also man 3 strftime


-----
Eric F Crist
Secure Computing Networks


_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"



--
-----------------------------------------------
Bill Banks                         508-829-2005
Wachusett Programming              Ourweb
http://www.ourweb.net
http://www.ourwebtemplates.com

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to