Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 May 2005 11:31:05 +0300
From:      "Sergey S. Ropchan" <fenix@ramb.com.ua>
To:        freebsd-questions@freebsd.org, Evan Sayer <esayer1@san.rr.com>
Subject:   Re: ctime date
Message-ID:  <1117182665.2499.2.camel@sirius.ramb.com.ua>
In-Reply-To: <5c9b56eee08d6c984986cf48a9290c9f@san.rr.com>
References:  <5c9b56eee08d6c984986cf48a9290c9f@san.rr.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1117182665.2499.2.camel>