ctime date

Sergey S. Ropchan fenix at ramb.com.ua
Fri May 27 01:31:22 PDT 2005


On Thu, 2005-05-26 at 22:50 -0700, Evan Sayer wrote:
> Hello-
> Does anyone know how to get the ctime(3) format of the date in a script 
> (i.e without actually writing a C program to return it).
> -Thanks.
#!/bin/sh

#get current date
DATE=`date "+%d%m%y"`

echo $DATE;

you can play with specs: %D, %Y ... etc

read man date

> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 



More information about the freebsd-questions mailing list