AWK in 4.X different from 5.X?

Jonathan Chen jonc at chen.org.nz
Mon Mar 28 11:19:50 PST 2005


On Mon, Mar 28, 2005 at 10:21:24AM -0500, Francisco Reyes wrote:
> On Mon, 28 Mar 2005, Jonathan Chen wrote:
> 
> >On Sun, Mar 27, 2005 at 12:09:03PM -0500, Francisco Reyes wrote:
> >>Since this was from a shell script I did
> >>date | awk '{print "#"$1 " " $2 "-" $3 "-" $6}'
> >
> >How about:
> >	date +"#%a %b - %d - %Y"
> 
> 
> Where/how do I put that?
> I tried to put it inside the awk side, but didn't work.

Eh? The command I was trying to replicate was:

    date | awk '{print "#"$1 " " $2 "-" $3 "-" $6}'

which is equivalent to :

    date +"#%a %b - %d - %Y"

Doing this within awk is another story.. Sorry.
-- 
Jonathan Chen <jonc at chen.org.nz>
----------------------------------------------------------------------
                                                          Jesus saves.
                                                       Allah forgives.
                             Cthulu thinks you'd make a nice sandwich.


More information about the freebsd-questions mailing list