Date: Mon, 28 Mar 2005 10:37:54 +1200 From: Jonathan Chen <jonc@chen.org.nz> To: Francisco Reyes <lists@natserv.com> Cc: freebsd-questions@freebsd.org Subject: Re: AWK in 4.X different from 5.X? Message-ID: <20050327223754.GA87442@osiris.chen.org.nz> In-Reply-To: <20050327120743.Y26666@zoraida.natserv.net> References: <20050326125154.Y49808@zoraida.natserv.net> <20050326142338.D50621@zoraida.natserv.net> <20050327143258.GA88210@Pandora.MHoerich.de> <20050327120743.Y26666@zoraida.natserv.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 27, 2005 at 12:09:03PM -0500, Francisco Reyes wrote: > On Sun, 27 Mar 2005, Mario Hoerich wrote: > > >>Now I just wonder how to get date in my output. :-( > > > >Well, if nothing else helps there's always system("date"). > >However, you could also install lang/gawk. > > Since this was from a shell script I did > date | awk '{print "#"$1 " " $2 "-" $3 "-" $6}' How about: date +"#%a %b - %d - %Y" -- Jonathan Chen <jonc@chen.org.nz> ---------------------------------------------------------------------- char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050327223754.GA87442>