From owner-freebsd-questions@FreeBSD.ORG Sun Mar 27 22:37:57 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 0853616A4CE for ; Sun, 27 Mar 2005 22:37:57 +0000 (GMT) Received: from chen.org.nz (chen.org.nz [210.54.19.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E4A643D60 for ; Sun, 27 Mar 2005 22:37:55 +0000 (GMT) (envelope-from jonc@chen.org.nz) Received: by chen.org.nz (Postfix, from userid 1000) id 419545641C; Mon, 28 Mar 2005 10:37:54 +1200 (NZST) Date: Mon, 28 Mar 2005 10:37:54 +1200 From: Jonathan Chen To: Francisco Reyes Message-ID: <20050327223754.GA87442@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050327120743.Y26666@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: Sun, 27 Mar 2005 22:37:57 -0000 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 ---------------------------------------------------------------------- char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}