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

Re: Usage of echo



Svante Signell <svante.signell@telia.com> wrote:

> How to echo the current date and time to a log file?
> 
> echo 'date:' ??? 'time:' ??? > file.log

There is no need to use echo.

date +"date: %x time: %X" > file.log

-- 
Thomas Weinbrenner



Reply to: