From owner-freebsd-questions Fri Jan 4 14:53:21 2002 Delivered-To: freebsd-questions@freebsd.org Received: from lurza.secnetix.de (lurza.secnetix.de [212.66.1.130]) by hub.freebsd.org (Postfix) with ESMTP id 29EE537B41F for ; Fri, 4 Jan 2002 14:53:17 -0800 (PST) Received: (from olli@localhost) by lurza.secnetix.de (8.11.6/8.11.6) id g04MrOP98897; Fri, 4 Jan 2002 23:53:24 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Date: Fri, 4 Jan 2002 23:53:24 +0100 (CET) Message-Id: <200201042253.g04MrOP98897@lurza.secnetix.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG Reply-To: freebsd-questions@FreeBSD.ORG Subject: Re: any way to make efficient the awk script In-Reply-To: <20020104202751.GA82783@moo.holy.cow> X-Newsgroups: list.freebsd-questions User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.4-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG parv wrote: > in particular, i want to know if printf() & print > statements could be combined. Yes, sure. If you don't change OFS, then print foo, bar, baz; is exactly the same as printf "%s %s %s\n", foo, bar, baz; Therefore, combining them should be easy. However, I don't think it buys you much in terms of efficiency. If you are really concerned about efficiency (if you have to handle millions of lines), then you'd better rewrite this in C. Regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "All that we see or seem is just a dream within a dream" (E. A. Poe) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message