From owner-freebsd-questions@FreeBSD.ORG Mon Mar 28 19:19:50 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D2E016A4CE for ; Mon, 28 Mar 2005 19:19:50 +0000 (GMT) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FAED43D39 for ; Mon, 28 Mar 2005 19:19:50 +0000 (GMT) (envelope-from jonc@chen.org.nz) Received: by chen.org.nz (Postfix, from userid 1000) id 781D05641E; Tue, 29 Mar 2005 07:19:48 +1200 (NZST) Date: Tue, 29 Mar 2005 07:19:48 +1200 From: Jonathan Chen To: Francisco Reyes Message-ID: <20050328191948.GC92392@osiris.chen.org.nz> References: <20050326125154.Y49808@zoraida.natserv.net> <20050326142338.D50621@zoraida.natserv.net> <20050327143258.GA88210@Pandora.MHoerich.de> <20050327120743.Y26666@zoraida.natserv.net> <20050327223754.GA87442@osiris.chen.org.nz> <20050328101610.D7970@zoraida.natserv.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050328101610.D7970@zoraida.natserv.net> User-Agent: Mutt/1.4.2.1i cc: freebsd-questions@freebsd.org Subject: Re: AWK in 4.X different from 5.X? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 19:19:50 -0000 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 ---------------------------------------------------------------------- Jesus saves. Allah forgives. Cthulu thinks you'd make a nice sandwich.