Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2002 23:53:24 +0100 (CET)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: any way to make efficient the awk script
Message-ID:  <200201042253.g04MrOP98897@lurza.secnetix.de>
In-Reply-To: <20020104202751.GA82783@moo.holy.cow>

next in thread | previous in thread | raw e-mail | index | archive | help
parv <parv_@yahoo.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201042253.g04MrOP98897>