1745784 Members
3889 Online
108722 Solutions
New Discussion юеВ

Re: awk date script

 
Raul Andrade_1
Frequent Advisor

awk date script

Hello
Please, im trying the make a cron with a script but the output named contain date with minutes and seconds.
ls -la > date
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: awk date script

Shalom Raul,

fname=`date +%Y%m%e.%I%M%S`
bname=`basename $0`.log
logfile="/oracle/logs/prd/${fname}.${bname}"


man date

That will list the possible formats you need.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sandman!
Honored Contributor

Re: awk date script

Raul,

Your thread does not indicate what exactly you're trying to accomplish...Could you provide more details.

thanks!