From: Eric Blake Date: Thu, 20 May 2010 21:07:03 +0000 (-0600) Subject: Mention another line-counting alternative. X-Git-Tag: v2.66~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f91e8dbe6dbd11d68e18ae664c2c7399fc34e8a4;p=thirdparty%2Fautoconf.git Mention another line-counting alternative. GCS lists sed but not wc as a portable app for Makefile. * doc/autoconf.texi (Limitations of Usual Tools) : Mention how to use sed to count lines. Suggested by Paolo Bonzini. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index fd7d0684..f9b7d041 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-05-20 Eric Blake + + Mention another line-counting alternative. + * doc/autoconf.texi (Limitations of Usual Tools) : Mention + how to use sed to count lines. + Suggested by Paolo Bonzini. + 2010-05-12 Eric Blake Document the grep workaround. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index ff62eac9..cbdb56b8 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -17830,8 +17830,8 @@ doesn't exist) of @code{grep} to @file{/dev/null}. Check the exit status of @code{grep} to determine whether it found a match. The QNX4 implementation fails to count lines with @code{grep -c '$'}, -but works with @code{grep -c '^'}. Another alternative for counting -lines is to use @code{wc -l}. +but works with @code{grep -c '^'}. Other alternatives for counting +lines are to use @code{sed -n '$='} or @code{wc -l}. Some traditional @command{grep} implementations do not work on long input lines. On AIX the default @code{grep} silently truncates long