[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: traditional awk: lazy splitting of $0?
From: |
Ralf Wildenhues |
Subject: |
Re: traditional awk: lazy splitting of $0? |
Date: |
Sat, 24 Nov 2007 09:37:51 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi Eric,
* Eric Blake wrote on Sat, Nov 17, 2007 at 01:38:55PM CET:
> According to Ralf Wildenhues on 11/17/2007 1:38 AM:
> > Tru64 4.0D awk
> > even splits the input if $i, i>0, was never accessed in the script.
>
> Let's document that in autoconf.texi, then.
Sure. Proposed patch below. Will apply in a couple of days.
Cheers, and sorry for the delay,
Ralf
* doc/autoconf.texi (Limitations of Usual Tools) <awk>:
Document that Tru64 awk always splits $0.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 76d4b77..d6bd786 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -14487,9 +14487,10 @@ In code portable to both traditional and modern Awk,
@code{FS} must be a
string containing just one ordinary character, and similarly for the
field-separator argument to @code{split}.
-Traditional Awk has a limit of 99
-fields in a record. You may be able to circumvent this problem by using
address@hidden
+Traditional Awk has a limit of 99 fields in a record. Since some Awk
+implementations, like Tru64's, split the input even if you don't refer
+to any field in the script, to circumvent this problem, set @samp{FS}
+to an unusual character and use @code{split}.
Traditional Awk has a limit of at most 99 bytes in a number formatted by
@code{OFMT}; for example, @code{OFMT="%.300e"; print 0.1;} typically