[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Usage of echo



On 26/11/2000 at 20:16 +0100, Svante Signell wrote:
> How to echo the current date and time to a log file?
> 
> echo 'date:' ??? 'time:' ??? > file.log
> 

 $ echo date: $(date +%x) time: $(date +%X)
 date: 26-11-2000 time: 20:02:07

Is this what you want? Check the date manpage for more options.

Regards, sena...

-- 
sena@decoy.ath.cx, http://decoy.ath.cx/~sena/
gpg fingerprint: F20B 12A8 A8F6 FD1F 9B1D BA62 C424 8E73 DD2E 47C8




Reply to: