diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 124 | ||||
-rw-r--r-- | doc/Makefile.am | 5 | ||||
-rw-r--r-- | doc/Makefile.in | 321 | ||||
-rw-r--r-- | doc/awkcard.in | 626 | ||||
-rw-r--r-- | doc/gawk.1 | 32 | ||||
-rw-r--r-- | doc/gawk.info | 1632 | ||||
-rw-r--r-- | doc/gawk.texi | 598 | ||||
-rw-r--r-- | doc/gawkinet.info | 229 | ||||
-rw-r--r-- | doc/gawkinet.texi | 108 |
9 files changed, 2326 insertions, 1349 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 91d01a33..ca495c91 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,127 @@ +Tue Jul 21 22:28:56 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Release 3.1.7: Release tar file made. + +Tue Jul 21 22:20:25 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi, awkcard.in: Update mawk site information now + that Thomas Dickey is maintaining it. + +Mon Jul 13 07:53:32 2009 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (SEDME2): New macro, used in making awkcard.ps, + removes last empty page. Finally! + +Fri Jul 10 10:35:29 2009 Arnold D. Robbins <arnold@skeeve.com> + + * awkcard.in: Rearrange items for better formatting and + organization. + * gawk.texi (Exit Status): New node to document exit values. + (Exit Statement): Give portability advice about exit value. + +Wed Jul 8 08:55:50 2009 Arnold D. Robbins <arnold@skeeve.com> + + * awkcard.in: Really fix table option for --verbose. Other + fixes and improvements, including document %'d flag. + +Tue Jul 7 09:13:02 2009 Arnold D. Robbins <arnold@skeeve.com> + + * awkcard.in: Fix table option for --verbose. + +Mon Jun 8 00:40:26 2009 Tommi Vainikainen <thv@iki.fi> + + * gawk.1: Bug fix to restore space between paragraphs at + entry for "--". + +Thu May 21 21:09:59 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1, awkcard.in: Document new -O / --optimize option. + * gawk.texi (Options): Likewise. + +Fri May 15 14:34:37 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (User-defined): Document that you can't use + the name of a built-in variable as a function parameter. + +Sat May 2 23:36:10 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Other Versions): Add Quiktrim awk. + (How to Contribute): Change things to point to awk.info. + +Mon Apr 6 22:29:47 2009 Arnold D. Robbins <arnold@skeeve.com> + + * awkcard.in: Bell Labs awk also supports fflush() + and fflush(""). Thanks to Steffen Schuler + <schuler.steffen@googlemail.com>. + +Mon Mar 30 21:26:04 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Simple Server): Fix bug since 3.1.0 where error + message from typo was in the middle of the HandleGet function. + Thanks to Tim Menzies for catching this. + +Mon Feb 9 22:11:16 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Translate Program): Bug fix in stranslate + function from Steffen Schuler <schuler.steffen@googlemail.com>. + +Tue Feb 3 22:06:10 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Regexp Field Splitting): Documented dark corner + of ^ in FS. + +Sat Jan 17 20:37:12 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Plain Getline): Bug fix in code. Thanks to + Steffen Schuler <schuler.steffen@googlemail.com>. + +Mon Jan 5 22:47:42 2009 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.1, awkcard.in: Document that getline returns 1 + on sucess. Thanks to Paolo <oopla@users.sf.net> for + the report. + +Fri Dec 26 14:45:39 2008 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi, gawkinet.texi: Update to FDL 1.3. + +Mon Dec 1 21:20:39 2008 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (File Checking): Correct the text at the end; getline + isn't fatal, period, not related to POSIX. Thanks to + Seb <sbb@tuxfamily.org> for pointing this out. + (Round-Function): Change initial return when equal to return ival, + which lops off any digits, e.g. if given 121.0. Thanks to + Timothy J. Stefanski <TJStefanski@magellanhealth.com>. + +Fri Aug 1 17:34:55 2008 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Signature Program): Added new subsection. + +Thu Jul 31 21:38:08 2008 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Variable Typing): Document that array elements created + by `match' also get strnum attribute. + +Mon Jun 2 22:47:08 2008 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi (Control Letters): Add a note about %c only + taking values from 0 to 255. + (DOS Quoting): New node. + +Thu Jan 31 16:17:27 2008 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi, gawkinet.texi: Updated the Back-Cover text per + latest from the FSF. + +Fri Jan 25 12:13:39 2008 Dave Pitts <dpitts@cozx.com> + + * gawk.texi (pwcat.c, grcat.c): Added ZOS_USS changes. + +Mon Jan 14 05:30:16 2008 Arnold D. Robbins <arnold@skeeve.com> + + * gawk.texi: Add maintainer contact info for z/OS. + Mon Oct 22 08:49:05 2007 Arnold D. Robbins <arnold@skeeve.com> * Release 3.1.6: Release tar file made. diff --git a/doc/Makefile.am b/doc/Makefile.am index b83f9d67..3e872088 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -43,6 +43,7 @@ MAKEINFO = @MAKEINFO@ --no-split --force TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" +SEDME2 = sed '/%%Page: 10 10/,/0 Cg EP/d' CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr @@ -91,7 +92,7 @@ awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr awkcard.ps: $(CARDFILES) - $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps + $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps awkcard.nc: $(CARDFILES) - $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps && touch awkcard.nc + $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps && touch awkcard.nc diff --git a/doc/Makefile.in b/doc/Makefile.in index efd6ff05..3b105300 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -39,8 +40,9 @@ # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -65,16 +67,19 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ - $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ - $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ - $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ - $(top_srcdir)/configure.ac + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/longlong.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ + $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ + $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ + $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/gawk.info $(srcdir)/gawkinet.info @@ -95,13 +100,29 @@ am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ +AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ @@ -114,11 +135,15 @@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ GMSGFMT_015 = @GMSGFMT_015@ GREP = @GREP@ @@ -129,11 +154,15 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTLLIBS = @INTLLIBS@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSIGSEGV = @LIBSIGSEGV@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ @@ -143,7 +172,12 @@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -153,6 +187,9 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ POSUB = @POSUB@ RANLIB = @RANLIB@ +SED = @SED@ +SEGVINCLUDE = @SEGVINCLUDE@ +SEGVSUBDIR = @SEGVSUBDIR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKET_LIBS = @SOCKET_LIBS@ @@ -162,6 +199,7 @@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abs_builddir = @abs_builddir@ @@ -169,6 +207,7 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -199,6 +238,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -209,8 +249,10 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ +subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ info_TEXINFOS = gawk.texi gawkinet.texi @@ -229,6 +271,7 @@ TROFF = groff -t -Tps -U SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto (Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \ -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/" +SEDME2 = sed '/%%Page: 10 10/,/0 Cg EP/d' CARDSRC = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/colors awkcard.tr CARDSRC_N = $(srcdir)/macros $(srcdir)/cardfonts $(srcdir)/no.colors awkcard.tr CARDFILES = $(CARDSRC) ad.block awkcard.in setter.outline @@ -255,14 +298,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -280,10 +323,17 @@ $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs .texi.info: restore=: && backupdir="$(am__leading_dot)am$$$$" && \ - am__cwd=`pwd` && cd $(srcdir) && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ @@ -295,10 +345,10 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) -o $@ $<; \ then \ rc=0; \ - cd $(srcdir); \ + $(am__cd) $(srcdir); \ else \ rc=$$?; \ - cd $(srcdir) && \ + $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc @@ -340,16 +390,18 @@ gawkinet.html: gawkinet.texi uninstall-dvi-am: @$(NORMAL_UNINSTALL) - @list='$(DVIS)'; for p in $$list; do \ - f=$(am__strip_dir) \ + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) - @list='$(HTMLS)'; for p in $$list; do \ - f=$(am__strip_dir) \ + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done @@ -363,7 +415,8 @@ uninstall-info-am: for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ - install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @@ -379,16 +432,18 @@ uninstall-info-am: uninstall-pdf-am: @$(NORMAL_UNINSTALL) - @list='$(PDFS)'; for p in $$list; do \ - f=$(am__strip_dir) \ + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) - @list='$(PSS)'; for p in $$list; do \ - f=$(am__strip_dir) \ + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done @@ -405,20 +460,25 @@ dist-info: $(INFO_DEPS) for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f $(distdir)/$$relfile || \ - cp -p $$file $(distdir)/$$relfile; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf gawk.aux gawk.cp gawk.cps gawk.fn gawk.ky gawk.kys gawk.log gawk.pg \ - gawk.pgs gawk.tmp gawk.toc gawk.tp gawk.tps gawk.vr gawk.dvi \ - gawk.pdf gawk.ps gawk.html gawkinet.aux gawkinet.cp \ - gawkinet.cps gawkinet.fn gawkinet.ky gawkinet.kys \ - gawkinet.log gawkinet.pg gawkinet.pgs gawkinet.tmp \ - gawkinet.toc gawkinet.tp gawkinet.tps gawkinet.vr \ - gawkinet.dvi gawkinet.pdf gawkinet.ps gawkinet.html + gawk.pgs gawk.tmp gawk.toc gawk.tp gawk.tps gawk.vr \ + gawkinet.aux gawkinet.cp gawkinet.cps gawkinet.fn \ + gawkinet.ky gawkinet.kys gawkinet.log gawkinet.pg \ + gawkinet.pgs gawkinet.tmp gawkinet.toc gawkinet.tp \ + gawkinet.tps gawkinet.vr + +clean-aminfo: + -test -z "gawk.dvi gawk.pdf gawk.ps gawk.html gawkinet.dvi gawkinet.pdf \ + gawkinet.ps gawkinet.html" \ + || rm -rf gawk.dvi gawk.pdf gawk.ps gawk.html gawkinet.dvi gawkinet.pdf \ + gawkinet.ps gawkinet.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ @@ -426,51 +486,44 @@ maintainer-clean-aminfo: echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done -install-man1: $(man1_MANS) $(man_MANS) +install-man1: $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + @list=''; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done + @list=''; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ + sed -n '/\.1[a-z]*$$/p'; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: @@ -479,6 +532,19 @@ CTAGS: distdir: $(DISTFILES) + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -494,13 +560,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -535,13 +605,14 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic mostlyclean-am +clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile @@ -562,17 +633,19 @@ info-am: $(INFO_DEPS) install-data-am: install-info-am install-man @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook - install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" - @list='$(DVIS)'; for p in $$list; do \ + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: @@ -581,26 +654,31 @@ install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" - @list='$(HTMLS)'; for p in $$list; do \ + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ + $(am__strip_dir) \ if test -d "$$d$$p"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \ + list2="$$list2 $$d$$p"; \ fi; \ - done + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - list='$(INFO_DEPS)'; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ @@ -608,18 +686,19 @@ install-info-am: $(INFO_DEPS) if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ - $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ - relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ - echo " $(INSTALL_DATA) '$$ifile' '$(DESTDIR)$(infodir)/$$relfile'"; \ - $(INSTALL_DATA) "$$ifile" "$(DESTDIR)$(infodir)/$$relfile"; \ + echo "$$ifile"; \ else : ; fi; \ done; \ - done + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ @@ -633,23 +712,27 @@ install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" - @list='$(PDFS)'; for p in $$list; do \ + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \ - done + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" - @list='$(PSS)'; for p in $$list; do \ + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \ - $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \ - done + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am @@ -659,7 +742,8 @@ maintainer-clean-am: distclean-am maintainer-clean-aminfo \ mostlyclean: mostlyclean-am -mostlyclean-am: mostlyclean-aminfo mostlyclean-generic +mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ + mostlyclean-libtool pdf: pdf-am @@ -673,24 +757,24 @@ uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-man uninstall-pdf-am uninstall-ps-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook - uninstall-man: uninstall-man1 .MAKE: install-am install-data-am install-strip uninstall-am -.PHONY: all all-am check check-am clean clean-generic dist-info \ - distclean distclean-generic distdir dvi dvi-am html html-am \ - info info-am install install-am install-data install-data-am \ +.PHONY: all all-am check check-am clean clean-aminfo clean-generic \ + clean-libtool dist-info distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ - mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-dvi-am uninstall-hook \ - uninstall-html-am uninstall-info-am uninstall-man \ - uninstall-man1 uninstall-pdf-am uninstall-ps-am + mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \ + uninstall-hook uninstall-html-am uninstall-info-am \ + uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am # Link gawk.1 to pgawk.1 @@ -721,10 +805,11 @@ awkcard.tr: awkcard.in sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr awkcard.ps: $(CARDFILES) - $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps + $(TROFF) $(CARDSRC) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps awkcard.nc: $(CARDFILES) - $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - > awkcard.ps && touch awkcard.nc + $(TROFF) $(CARDSRC_N) | $(SEDME) | cat $(srcdir)/setter.outline - | $(SEDME2) > awkcard.ps && touch awkcard.nc + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/doc/awkcard.in b/doc/awkcard.in index 30591403..4642918e 100644 --- a/doc/awkcard.in +++ b/doc/awkcard.in @@ -1,7 +1,7 @@ .\" AWK Reference Card --- Arnold Robbins, arnold@skeeve.com .\" .\" Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, -.\" 2003, 2004, 2005, 2007 Free Software Foundation, Inc. +.\" 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. .\" .\" Permission is granted to make and distribute verbatim copies of .\" this reference card provided the copyright notice and this permission @@ -48,9 +48,9 @@ .in +.2i .nf \*(FRAction Statements 7 -Arrays 11 +Arrays 10 Awk Program Execution 4 -Bit Manipulation Functions (\*(GK) 16 +Bit Manipulation Functions (\*(GK) 15 Bug Reports 2 Closing Redirections 12 Command Line Arguments (standard) 2 @@ -59,28 +59,28 @@ Command Line Arguments (\*(MK) 4 Conversions And Comparisons 9 Copying Permissions 18 Definitions 2 -Dynamic Extensions (\*(GK) 14 -Environment Variables (\*(GK) 16 +Dynamic Extensions (\*(GK) 16 +Environment Variables (\*(GK) 17 Escape Sequences 8 -Expressions 11 +Expressions 10 Fields 6 FTP/HTTP Information 18 -Historical Features (\*(GK) 10 -Input Control 12 -Internationalization (\*(GK) 18 +Historical Features (\*(GK) 17 +Input Control 11 +Internationalization (\*(GK) 16 Lines And Statements 5 -Localization (\*(GK) 17 -Numeric Functions 14 -Output Control 12 +Localization (\*(GK) 16 +Numeric Functions 15 +Output Control 11 Pattern Elements 7 -POSIX Character Classes (\*(GK) 6 +POSIX Character Classes 6 Printf Formats 13 Records 6 Regular Expressions 5 Signals (\*(PK) 4 -Special Filenames 14 -String Functions 15 -Time Functions (\*(GK) 16 +Special Filenames 12 +String Functions 14 +Time Functions (\*(GK) 15 User-defined Functions 17 Variables 8\*(CX .in -.2i @@ -101,7 +101,7 @@ Brian Kernighan and Michael Brennan who reviewed it. .SL .nf \*(FRCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -2005, 2007 Free Software Foundation, Inc. +2005, 2007, 2009 Free Software Foundation, Inc. .nf .BT @@ -193,19 +193,7 @@ read the AWK program source from the file \*(FIprog-file\*(FR, instead of from the first command line argument. Multiple \*(FC\-f\*(FR options may be used. T} -\*(FC\-\^\-\*(FR signal the end of options. -.TE -.sp .5 -.fi -\*(CLThe following options are accepted by both \*(NK and \*(GK -\*(CR(ignored by \*(GK, not in \*(MK).\*(CL -.sp .5 -.nf -.TS -expand, tab(%); -l lw(2.2i). -\*(FC\-mf \*(FIval\*(FR%set the maximum number of fields to \*(FIval\fP -\*(FC\-mr \*(FIval\*(FR%set the maximum record size to \*(FIval\fP\*(CX +\*(FC\-\^\-\*(FR signal the end of options.\*(CX .TE .EB "\s+2\f(HBCOMMAND LINE ARGUMENTS (standard)\*(FR\s0" @@ -273,8 +261,9 @@ uses \*(FCawkvars.out\*(FR. T} \*(FC\-\^\-exec \*(FIfile\*(FR%T{ read program text from \*(FIfile\fP. No other -options are processed. Useful with \*(FC#!\fP. +options are processed. Also disables command-line variable assignments. +Useful with \*(FC#!\fP. T} \*(FC\-\^\-gen\-po\*(FR%T{ process the program and print a GNU \*(FCgettext\*(FR @@ -295,14 +284,14 @@ ls l lw(2.2i). \*(FC\-\^\-lint\*(FR[\*(FC=\*(FIvalue\*(FR] %T{ -warn about constructs that are dubious -or non-portable to other \*(AKs. -With an optional argument of \*(FCfatal\*(FR, +warn about dubios or non-portable constructs. +If \*(FIvalue\*(FR is +\*(FCfatal\*(FR, lint warnings become fatal errors. -With an optional argument of +If \*(FIvalue\*(FR is \*(FCinvalid\*(FR, -only warnings about things that are -actually invalid are issued. (This is not fully implemented yet.) +only issue warnings about things that are +actually invalid (not fully implemented yet). T} .T& l lw(2.2i). @@ -320,6 +309,13 @@ recognize octal and hexadecimal values in input data. \*(FIUse this option with great caution!\*(FR T} .T& +ls +l lw(2.2i). +\*(FC\-\^\-optimize\*(FR, \*(FC\-O\*(FR +%T{ +enable some internal optimizations. +T} +.T& l lw(2.2i). \*(FC\-\^\-posix\*(FR%T{ disable common and GNU extensions. @@ -356,8 +352,13 @@ l lw(2.2i). \*(FC\-\^\-source '\*(FItext\*(FC'\*(FR %T{ use \*(FItext\*(FR as AWK program source code. +T} +.T& +l lw(2.2i). \*(FC\-\^\-version\*(FR%T{ -print version information on \*(FCstdout\fP +print version \" information +info +on \*(FCstdout\fP and exit zero. T} .T& @@ -372,7 +373,7 @@ T} .fi In compatibility mode, any other options are flagged as invalid, but are otherwise ignored. -Normally, if there is program text, unknown options +Normally, if there is program text, unknown options are passed on to the AWK program in \*(FCARGV\*(FR for processing.\*(CB @@ -586,12 +587,12 @@ this feature in \*(GK.\*(CX .BT -.\" --- POSIX Character Classes (gawk) +.\" --- POSIX Character Classes .ES .fi \*(CDIn regular expressions, within character ranges (\*(FC[\*(FR...\*(FC]\*(FR), -the notation \*(FC[[:\*(FIclass\*(FC:]]\*(FR defines character classes: +the notation \*(FC[[:\*(FIclass\*(FC:]]\*(FR defines character classes \*(CR(not \*(MK\fP)\*(CD: .sp .5 .TS center, tab(~); @@ -605,9 +606,9 @@ lp8 lp8 lp8 lp8. .TE .fi .sp .5 -Recognition of these character classes is disabled -when \*(FC\-\-traditional\*(FR is supplied.\*(CB -.EB "\s+2\f(HBPOSIX CHARACTER CLASSES (\*(GK\f(HB)\*(FR\s0" +\*(CB\*(FRRecognition of these character classes is disabled +when \*(FC\-\-traditional\*(FR is supplied.\*(CL +.EB "\s+2\f(HBPOSIX CHARACTER CLASSES\*(FR\s0" .\" --- Records .ES @@ -715,7 +716,6 @@ It matches all input records starting with a record that matches It does not combine with any other pattern expression.\*(CX .EB "\s+2\f(HBPATTERN ELEMENTS\*(FR\s0" - .\" --- Action Statements .ES .fi @@ -1020,31 +1020,6 @@ Uninitialized variables have the numeric value 0 and the string value .BT -.\" --- Historical Features -.ES -.fi -\*(CD1. It is possible to call the \*(FClength()\fP -built-in function not only with no argument, but even without parentheses. -This feature is marked as ``deprecated'' in the POSIX standard, and \*(GK -issues a warning about its use if \*(FC\-\^\-lint\fP -is specified on the command line. -.sp .5 -2. The \*(FCcontinue\fP -and \*(FCbreak\fP statements may be used outside the body of a -\*(FCwhile\*(FR, \*(FCfor\*(FR, or \*(FCdo\fP loop. -Historical AWK implementations have treated such usage as -equivalent to the \*(FCnext\fP statement. -\*(GK supports this usage if \*(FC\-\^\-traditional\fP -is specified.\*(CB -.EB "\s+2\f(HBHISTORICAL FEATURES (\*(GK\f(HB)\*(FR\s0" - -.ES -\*(CX -.sp 47 -.EB "\s+2\f(HBNOTES\*(FR\s0" - -.BT - .\" --- Arrays .ES .fi @@ -1199,7 +1174,7 @@ This usage is no longer supported. .in -.2i .sp .5 .fi -\*(FCgetline\*(FR returns 0 on end of file and \-1 on an error. +\*(FCgetline\*(FR returns 1 on success, 0 on end of file, and \-1 on an error. \*(CBUpon an error, \*(FCERRNO\*(FR contains a string describing the problem.\*(CX .EB "\s+2\f(HBINPUT CONTROL\*(FR\s0" @@ -1215,7 +1190,7 @@ flush any buffers associated with the open output file or pipe \*(FIfile\*(FR.\*(CD \*(CBIf no \*(FIfile\fP, then flush standard output. If \*(FIfile\fP is null, then flush all open output files and pipes -\*(CR(not \*(NK)\*(CD. +(\*(GK and \*(NK)\*(CD. .ti -.2i \*(FCprint\fP .br @@ -1262,6 +1237,9 @@ print data down a pipeline to co-process \*(FIcmd\*(FR.\*(CX .in -.2i .EB "\s+2\f(HBOUTPUT CONTROL\*(FR\s0" +.BT + +.\" --- Closing Redirections .ES .fi .in +.2i @@ -1285,6 +1263,85 @@ if there was a system problem. the error.\*(CX .EB "\s+2\f(HBCLOSING REDIRECTIONS\*(FR\s0" +.\" --- Special Filenames +.ES +.fi +\*(CDWhen doing I/O redirection from either \*(FCprint\fP +or \*(FCprintf\fP into a file or via \*(FCgetline\fP +from a file, all three implementations of \*(FCawk\fP +recognize certain special filenames internally. These filenames +allow access to open file descriptors inherited from the +parent process (usually the shell). +These filenames may also be used on the command line to name data files. +The filenames are: +.sp .5 +.TS +expand; +l lw(2i). +\*(FC"\-"\fP standard input +\*(FC/dev/stdin\fP standard input \*(CR(not \*(MK)\*(CD +\*(FC/dev/stdout\fP standard output +\*(FC/dev/stderr\fP standard error output +.TE +.sp .5 +.fi +\*(CBThe following names are specific to \*(GK. +.sp .5 +.in +.2i +.ti -.2i +\*(FC/dev/fd/\^\*(FIn\*(FR +.br +File associated with the open file descriptor \*(FIn\*(FR. +.ti -.2i +\*(FC/inet/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +File for TCP/IP connection on local port \*(FIlport\*(FR to +remote host \*(FIrhost\*(FR on remote port \*(FIrport\*(FR. +Use a port of \*(FC0\*(FR to have the system pick a port. +Usable only with the \*(FC|&\*(FR two-way I/O operator. +.ti -.2i +\*(FC/inet/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +Similar, but use UDP/IP instead of TCP/IP. +.ti -.2i +\*(CR\*(FC/inet/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR +.br +.\" Similar, but use raw IP sockets. +Reserved for future use.\*(CB +.in -.2i +.sp .5 +.fi +Other special filenames provide access to information about the running +\*(FCgawk\fP process. +Reading from these files returns a single record. +The filenames and what they return are:\*(FR +.sp .5 +.TS +expand; +l lw(2i). +\*(FC/dev/pid\fP process ID of current process +\*(FC/dev/ppid\fP parent process ID of current process +\*(FC/dev/pgrpid\fP process group ID of current process +\*(FC/dev/user\fP T{ +.nf +a single newline-terminated record. +The fields are separated with spaces. +\*(FC$1\fP is the return value of \*(FIgetuid\*(FR(2), +\*(FC$2\fP is the return value of \*(FIgeteuid\*(FR(2), +\*(FC$3\fP is the return value of \*(FIgetgid\*(FR(2) , and +\*(FC$4\fP is the return value of \*(FIgetegid\*(FR(2). +.fi +Any additional fields are the group IDs returned +by \*(FIgetgroups\*(FR(2). Multiple groups may not be +supported on all systems. +T} +.TE +.sp .5 +.fi +\*(CRThese filenames are now obsolete. +Use the \*(FCPROCINFO\fP array to obtain the information they provide.\*(CL +.EB "\s+2\f(HBSPECIAL FILENAMES\*(FR\s0" + .BT .\" --- Printf Formats @@ -1296,8 +1353,7 @@ accept the following conversion specification formats: .sp .5 .nf \*(FC%c\fP an \s-1ASCII\s+1 character -\*(FC%d\fP a decimal number (the integer part) -\*(FC%i\fP a decimal number (the integer part) +\*(FC%d\fP, \*(FC%i\fP a decimal number (the integer part) \*(FC%e\fP a floating point number of the form \*(FC[\-]d.dddddde[+\^\-]dd\*(FR \*(FC%E\fP like \*(FC%e\fP, but use \*(FCE\fP instead of \*(FCe\*(FR @@ -1360,12 +1416,14 @@ T} trailing zeros are not removed. T} \*(FC0\fP T{ -a leading zero acts as a flag, indicating output -should be padded with zeros instead of spaces. +pad output with zeros instead of spaces. This applies even to non-numeric output formats. Only has an effect when the field width is wider than the value to be printed. T} +\*(CB\*(FC'\*(FR T{ +use the locale's thousands separator for \*(FC%d\fP, \*(FC%i\fP, and \*(FC%u\fP.\*(CD +T} \*(FIwidth\fP T{ pad the field to this width. The field is normally padded with spaces. If the \*(FC0\fP flag has been used, @@ -1391,8 +1449,10 @@ T} .TE .sp .5 .fi +.ig The dynamic \*(FIwidth\fP and \*(FIprec\fP capabilities of the ANSI C \*(FCprintf()\fP routines are supported. +.. A \*(FC*\fP in place of either the \*(FIwidth\fP or \*(FIprec\fP specifications causes their values to be taken from the argument list to \*(FCprintf\fP or \*(FCsprintf()\*(FR. @@ -1403,129 +1463,6 @@ with a dynamic width or precision.\*(CX .BT -.\" --- Special Filenames -.ES -.fi -\*(CDWhen doing I/O redirection from either \*(FCprint\fP -or \*(FCprintf\fP into a file or via \*(FCgetline\fP -from a file, all three implementations of \*(FCawk\fP -recognize certain special filenames internally. These filenames -allow access to open file descriptors inherited from the -parent process (usually the shell). -These filenames may also be used on the command line to name data files. -The filenames are: -.sp .5 -.TS -expand; -l lw(2i). -\*(FC"\-"\fP standard input -\*(FC/dev/stdin\fP standard input \*(CR(not \*(MK)\*(CD -\*(FC/dev/stdout\fP standard output -\*(FC/dev/stderr\fP standard error output -.TE -.sp .5 -.fi -\*(CBThe following names are specific to \*(GK. -.sp .5 -.in +.2i -.ti -.2i -\*(FC/dev/fd/\^\*(FIn\*(FR -.br -File associated with the open file descriptor \*(FIn\*(FR. -.ti -.2i -\*(FC/inet/tcp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR -.br -File for TCP/IP connection on local port \*(FIlport\*(FR to -remote host \*(FIrhost\*(FR on remote port \*(FIrport\*(FR. -Use a port of \*(FC0\*(FR to have the system pick a port. -Usable only with the \*(FC|&\*(FR two-way I/O operator. -.ti -.2i -\*(FC/inet/udp/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR -.br -Similar, but use UDP/IP instead of TCP/IP. -.ti -.2i -\*(CR\*(FC/inet/raw/\*(FIlport\*(FC/\*(FIrhost\*(FC/\*(FIrport\*(FR -.br -.\" Similar, but use raw IP sockets. -Reserved for future use.\*(CB -.in -.2i -.sp .5 -.fi -Other special filenames provide access to information about the running -\*(FCgawk\fP process. -Reading from these files returns a single record. -The filenames and what they return are:\*(FR -.sp .5 -.TS -expand; -l lw(2i). -\*(FC/dev/pid\fP process ID of current process -\*(FC/dev/ppid\fP parent process ID of current process -\*(FC/dev/pgrpid\fP process group ID of current process -\*(FC/dev/user\fP T{ -.nf -a single newline-terminated record. -The fields are separated with spaces. -\*(FC$1\fP is the return value of \*(FIgetuid\*(FR(2), -\*(FC$2\fP is the return value of \*(FIgeteuid\*(FR(2), -\*(FC$3\fP is the return value of \*(FIgetgid\*(FR(2) , and -\*(FC$4\fP is the return value of \*(FIgetegid\*(FR(2). -.fi -Any additional fields are the group IDs returned -by \*(FIgetgroups\*(FR(2). Multiple groups may not be -supported on all systems. -T} -.TE -.sp .5 -.fi -\*(CRThese filenames are now obsolete. -Use the \*(FCPROCINFO\fP array to obtain the information they provide.\*(CL -.EB "\s+2\f(HBSPECIAL FILENAMES\*(FR\s0" -.sp .5 -.\" --- Builtin Numeric Functions -.ES -.fi -.TS -expand; -l lw(2i). -\*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR the arctangent of \*(FIy/x\fP in radians. -\*(FCcos(\*(FIexpr\*(FC)\*(FR the cosine of \*(FIexpr\fP, which is in radians. -\*(FCexp(\*(FIexpr\*(FC)\*(FR the exponential function (\*(FIe \*(FC^ \*(FIx\*(FR). -\*(FCint(\*(FIexpr\*(FC)\*(FR truncates to integer. -\*(FClog(\*(FIexpr\*(FC)\*(FR the natural logarithm function (base \*(FIe\^\*(FR). -\*(FCrand()\fP a random number between 0 and 1 (0 \(<= \*(FIN\fP < 1). -\*(FCsin(\*(FIexpr\*(FC)\*(FR the sine of \*(FIexpr\fP, which is in radians. -\*(FCsqrt(\*(FIexpr\*(FC)\*(FR the square root function. -\&\*(FCsrand(\*(FR[\*(FIexpr\^\*(FR]\*(FC)\*(FR T{ -uses \*(FIexpr\fP as a new seed for the random number -generator. If no \*(FIexpr\fP, the time of day is used. -Returns previous seed for the random number -generator.\*(CX -T} -.TE -.EB "\s+2\f(HBNUMERIC FUNCTIONS\*(FR\s0" -.sp .5 -.\" --- Extensions -.ES -.fi -.in +.2i -.ti -.2i -\*(CD\*(FCextension(\*(FIlib\*(FC, \*(FIfunc\*(FC)\*(FR -.br -dynamically load the shared library -\*(FIlib\*(FR -and call -\*(FIfunc\*(FR -in it to initialize the library. -This adds new built-in functions to \*(GK. -It returns the value returned by -\*(FIfunc\*(FR.\*(CB -.in -.2i -.EB "\s+2\f(HBDYNAMIC EXTENSIONS (\*(GK\f(HB)\*(FR\s0" - - -.BT - .\" --- Builtin String Functions .ES .fi @@ -1662,7 +1599,30 @@ corresponding upper-case counterparts. Non-alphabetic characters are left unchanged.\*(CX .in -.2i .EB "\s+2\f(HBSTRING FUNCTIONS (continued)\*(FR\s0" - +.sp .6 +.\" --- Builtin Numeric Functions +.ES +.fi +.TS +expand; +l lw(2i). +\*(CD\*(FCatan2(\*(FIy\*(FC, \*(FIx\*(FC)\*(FR the arctangent of \*(FIy/x\fP in radians. +\*(FCcos(\*(FIexpr\*(FC)\*(FR the cosine of \*(FIexpr\fP, which is in radians. +\*(FCexp(\*(FIexpr\*(FC)\*(FR the exponential function (\*(FIe \*(FC^ \*(FIx\*(FR). +\*(FCint(\*(FIexpr\*(FC)\*(FR truncates to integer. +\*(FClog(\*(FIexpr\*(FC)\*(FR the natural logarithm function (base \*(FIe\^\*(FR). +\*(FCrand()\fP a random number between 0 and 1 (0 \(<= \*(FIN\fP < 1). +\*(FCsin(\*(FIexpr\*(FC)\*(FR the sine of \*(FIexpr\fP, which is in radians. +\*(FCsqrt(\*(FIexpr\*(FC)\*(FR the square root function. +\&\*(FCsrand(\*(FR[\*(FIexpr\^\*(FR]\*(FC)\*(FR T{ +uses \*(FIexpr\fP as a new seed for the random number +generator. If no \*(FIexpr\fP, the time of day is used. +Returns previous seed for the random number +generator.\*(CX +T} +.TE +.EB "\s+2\f(HBNUMERIC FUNCTIONS\*(FR\s0" +.sp .6 .\" --- Builtin Time Functions .ES .fi @@ -1699,7 +1659,7 @@ returns the current time of day as the number of seconds since the Epoch.\*(CB .in -.2i .EB "\s+2\f(HBTIME FUNCTIONS (\*(GK\f(HB)\*(FR\s0" - +.sp .6 .\" --- Builtin Bit Manipulation Functions .ES .fi @@ -1741,25 +1701,116 @@ teturns the bitwise XOR of the values provided by .in -.2i .EB "\s+2\f(HBBIT MANIPULATION FUNCTIONS (\*(GK\f(HB)\*(FR\s0" -.\" --- Environment Variables +.BT + +.\" --- Extensions .ES .fi -\*(CDThe environment variable \*(FCAWKPATH\fP specifies a search path to use -when finding source files named with the \*(FC\-f\fP -option. -The default path is -\*(FC".:/usr/local/share/awk"\*(FR. -.\" if this variable does not exist. -.\" (The actual directory may vary, -.\" depending upon how \*(GK was built and installed.) -If a file name given to the \*(FC\-f\fP option contains a ``/'' character, -no path search is performed. +.in +.2i +.ti -.2i +\*(CD\*(FCextension(\*(FIlib\*(FC, \*(FIfunc\*(FC)\*(FR +.br +dynamically load the shared library +\*(FIlib\*(FR +and call +\*(FIfunc\*(FR +in it to initialize the library. +This adds new built-in functions to \*(GK. +It returns the value returned by +\*(FIfunc\*(FR.\*(CB +.in -.2i +.EB "\s+2\f(HBDYNAMIC EXTENSIONS (\*(GK\f(HB)\*(FR\s0" + +.\" --- Builtin Internationalization Functions +.ES +.fi +\*(CD\*(GK +provides the following functions for runtime message translation. +.in +.2i .sp .5 -If \*(FCPOSIXLY_CORRECT\fP exists -.\" in the environment, -then \*(GK -behaves exactly as if the \*(FC\-\^\-posix\fP option had been given.\*(CB -.EB "\s+2\f(HBENVIRONMENT VARIABLES (\*(GK\f(HB)\*(FR\s0" +.ti -.2i +\*(FCbindtextdomain(\*(FIdirectory \*(FR[\*(FC, \*(FIdomain\*(FR]\*(FC)\*(FR +.br +specifies the directory where \*(GK looks for the \*(FC\&.mo\*(FR +files, in case they +will not or cannot be placed in the ``standard'' locations +(e.g., during testing.) +It returns the directory where \*(FIdomain\*(FR is ``bound.'' +.sp .5 +The default \*(FIdomain\*(FR is the value of \*(FCTEXTDOMAIN\*(FR. +When \*(FIdirectory\*(FR is the null string (\*(FC"\^"\*(FR), +\*(FCbindtextdomain()\*(FR returns the current binding for the +given \*(FIdomain\*(FR. +.ti -.2i +\*(FCdcgettext(\*(FIstring \*(FR[\*(FC, \*(FIdomain \*(FR[\*(FC, \*(FIcategory\*(FR]]\*(FC)\*(FR +.br +returns the translation of \*(FIstring\*(FR in text domain +\*(FIdomain\*(FR for locale category \*(FIcategory\*(FR. +The default value for \*(FIdomain\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR. +The default value for \*(FIcategory\*(FR is \*(FC"LC_MESSAGES"\*(FR. +.sp .5 +If you supply a value for \*(FIcategory\*(FR, it must be a string equal to +one of the known locale categories. +You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR +to use the current domain. +.ti -.2i +\*(FCdcngettext(\*(FIstring1\*(FC, \*(FIstring2\*(FC, \*(FInumber\*(FR [\*(FC, \*(FIdom \*(FR[\*(FC, \*(FIcat\*(FR]]\*(FC)\*(FR +.br +returns the plural form used for \*(FInumber\*(FR of the translation of +\*(FIstring1\*(FR and \*(FIstring2\*(FR in text domain +\*(FIdom\*(FR for locale category \*(FIcat\*(FR. +The default value for \*(FIdom\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR. +\*(FC"LC_MESSAGES"\*(FR +is the default value for \*(FIcat\*(FR. +.sp .5 +If you supply a value for \*(FIcat\*(FR, it must be a string equal to +one of the known locale categories. +You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR +to use the current domain.\*(CB +.in -.2i +.EB "\s+2\f(HBINTERNATIONALIZATION (\*(GK\f(HB)\*(FR\s0" + +.\" --- Localization +.ES +.fi +\*(CDThere are several steps involved in producing and running a localizable +\*(AK program. +.sp .5 +1. Add a \*(FCBEGIN\*(FR action to assign a value to the +\*(FCTEXTDOMAIN\*(FR variable to set the text domain for +your program. +.sp .5 +.ti +5n +\*(FCBEGIN { TEXTDOMAIN = "myprog" }\*(FR +.sp .5 +This allows \*(GK to find the \*(FC\&.mo\*(FR +file associated with your program. +Without this step, \*(GK uses the \*(FCmessages\*(FR text domain, +which probably won't work. +.sp .5 +2. Mark all strings that should be translated with leading underscores. +.sp .5 +3. Use the +\*(FCbindtextdomain()\*(FR, +\*(FCdcgettext()\*(FR, +and/or +\*(FCdcngettext()\*(FR +functions in your program, as appropriate. +.sp .5 +4. Run +.sp .5 +.ti +5n +\*(FCgawk \-\^\-gen\-po \-f myprog.awk > myprog.po\*(FR +.sp .5 +to generate a \*(FC\&.po\*(FR +file for your program. +.sp .5 +5. Provide appropriate translations, and build and install a corresponding +\*(FC\&.mo\*(FR file. +.sp .5 +The internationalization features are described in full detail in \*(AM.\*(CB +.EB "\s+2\f(HBLOCALIZATION (\*(GK\f(HB)\*(FR\s0" + .BT @@ -1815,112 +1866,60 @@ may be used in place of \*(CRNote: This usage is deprecated.\*(CX .EB "\s+2\f(HBUSER-DEFINED FUNCTIONS\*(FR\s0" -.\" --- Localization +.\" --- Environment Variables .ES .fi -\*(CDThere are several steps involved in producing and running a localizable -\*(AK program. -.sp .5 -1. Add a \*(FCBEGIN\*(FR action to assign a value to the -\*(FCTEXTDOMAIN\*(FR variable to set the text domain for -your program. -.sp .5 -.ti +5n -\*(FCBEGIN { TEXTDOMAIN = "myprog" }\*(FR -.sp .5 -This allows \*(GK to find the \*(FC\&.mo\*(FR -file associated with your program. -Without this step, \*(GK uses the \*(FCmessages\*(FR text domain, -which probably won't work. -.sp .5 -2. Mark all strings that should be translated with leading underscores. -.sp .5 -3. Use the -\*(FCbindtextdomain()\*(FR, -\*(FCdcgettext()\*(FR, -and/or -\*(FCdcngettext()\*(FR -functions in your program, as appropriate. -.sp .5 -4. Run -.sp .5 -.ti +5n -\*(FCgawk \-\^\-gen\-po \-f myprog.awk > myprog.po\*(FR -.sp .5 -to generate a \*(FC\&.po\*(FR -file for your program. -.sp .5 -5. Provide appropriate translations, and build and install a corresponding -\*(FC\&.mo\*(FR file. +\*(CDThe environment variable \*(FCAWKPATH\fP specifies a search path to use +when finding source files named with the \*(FC\-f\fP +option. +The default path is +\*(FC".:/usr/local/share/awk"\*(FR. +.\" if this variable does not exist. +.\" (The actual directory may vary, +.\" depending upon how \*(GK was built and installed.) +If a file name given to the \*(FC\-f\fP option contains a ``/'' character, +no path search is performed. .sp .5 -The internationalization features are described in full detail in \*(AM.\*(CB -.EB "\s+2\f(HBLOCALIZATION (\*(GK\f(HB)\*(FR\s0" - - -.BT +If \*(FCPOSIXLY_CORRECT\fP exists +.\" in the environment, +then \*(GK +behaves exactly as if the \*(FC\-\^\-posix\fP option had been given.\*(CB +.EB "\s+2\f(HBENVIRONMENT VARIABLES (\*(GK\f(HB)\*(FR\s0" -.\" --- Builtin Internationalization Functions +.\" --- Historical Features .ES .fi -\*(CD\*(GK -provides the following functions for runtime message translation. -.in +.2i -.sp .5 -.ti -.2i -\*(FCbindtextdomain(\*(FIdirectory \*(FR[\*(FC, \*(FIdomain\*(FR]\*(FC)\*(FR -.br -specifies the directory where \*(GK looks for the \*(FC\&.mo\*(FR -files, in case they -will not or cannot be placed in the ``standard'' locations -(e.g., during testing.) -It returns the directory where \*(FIdomain\*(FR is ``bound.'' -.sp .5 -The default \*(FIdomain\*(FR is the value of \*(FCTEXTDOMAIN\*(FR. -When \*(FIdirectory\*(FR is the null string (\*(FC"\^"\*(FR), -\*(FCbindtextdomain()\*(FR returns the current binding for the -given \*(FIdomain\*(FR. -.ti -.2i -\*(FCdcgettext(\*(FIstring \*(FR[\*(FC, \*(FIdomain \*(FR[\*(FC, \*(FIcategory\*(FR]]\*(FC)\*(FR -.br -returns the translation of \*(FIstring\*(FR in text domain -\*(FIdomain\*(FR for locale category \*(FIcategory\*(FR. -The default value for \*(FIdomain\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR. -The default value for \*(FIcategory\*(FR is \*(FC"LC_MESSAGES"\*(FR. -.sp .5 -If you supply a value for \*(FIcategory\*(FR, it must be a string equal to -one of the known locale categories. -You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR -to use the current domain. -.ti -.2i -\*(FCdcngettext(\*(FIstring1\*(FC, \*(FIstring2\*(FC, \*(FInumber\*(FR [\*(FC, \*(FIdom \*(FR[\*(FC, \*(FIcat\*(FR]]\*(FC)\*(FR -.br -returns the plural form used for \*(FInumber\*(FR of the translation of -\*(FIstring1\*(FR and \*(FIstring2\*(FR in text domain -\*(FIdom\*(FR for locale category \*(FIcat\*(FR. -The default value for \*(FIdom\*(FR is the current value of \*(FCTEXTDOMAIN\*(FR. -\*(FC"LC_MESSAGES"\*(FR -is the default value for \*(FIcat\*(FR. +\*(CDIt is possible to call the \*(FClength()\fP +built-in function not only with no argument, but even without parentheses. +This feature is marked as ``deprecated'' in the POSIX standard, and \*(GK +issues a warning about its use if \*(FC\-\^\-lint\fP +is specified on the command line. .sp .5 -If you supply a value for \*(FIcat\*(FR, it must be a string equal to -one of the known locale categories. -You must also supply a text domain. Use \*(FCTEXTDOMAIN\*(FR -to use the current domain.\*(CB -.in -.2i -.EB "\s+2\f(HBINTERNATIONALIZATION (\*(GK\f(HB)\*(FR\s0" +The \*(FCcontinue\fP +and \*(FCbreak\fP statements may be used outside the body of a +\*(FCwhile\*(FR, \*(FCfor\*(FR, or \*(FCdo\fP loop. +Historical AWK implementations have treated such usage as +equivalent to the \*(FCnext\fP statement. +\*(GK supports this usage if \*(FC\-\^\-traditional\fP +is specified.\*(CB +.EB "\s+2\f(HBHISTORICAL FEATURES (\*(GK\f(HB)\*(FR\s0" + +.BT .\" --- FTP/HTTP Information .ES .nf \*(CDHost: \*(FCftp.gnu.org\*(FR -File: \*(FC/gnu/gawk/gawk-3.1.6.tar.gz\fP +File: \*(FC/gnu/gawk/gawk-3.1.7.tar.gz\fP .in +.2i .fi GNU \*(AK (\*(GK). There may be a later version. .in -.2i .nf .sp .5 -\*(FChttp://cm.bell-labs.com/who/bwk/awk.tar.gz\fP +\*(FChttp://www.cs.princeton.edu/~bwk/btl.mirror/ +awk.tar.gz\fP .in +.2i .fi \*(NK. This version requires an ANSI C compiler; @@ -1928,11 +1927,15 @@ GCC (the GNU Compiler Collection) works well. .in -.2i .nf .sp .5 -Host: \*(FCftp.whidbey.net\*(FR -File: \*(FC/pub/brennan/mawk1.3.3.tar.gz\fP +... Host: \*(FCftp.whidbey.net\*(FR +... File: \*(FC/pub/brennan/mawk1.3.3.tar.gz\fP +... \*(FChttp://www.skeeve.com/gawk/mawk1.3.3.tar.gz\fP +Host: \*(FCinvisible-island.net\*(FR +File: \*(FC/mawk/mawk.tar.gz\fP .in +.2i .fi -Michael Brennan's \*(MK. There may be a newer version.\*(CX +Michael Brennan's \*(MK. Thomas Dickey is now +maintaining it.\*(CX .in -.2i .EB "\s+2\f(HBFTP/HTTP INFORMATION\*(FR\s0" @@ -1941,7 +1944,7 @@ Michael Brennan's \*(MK. There may be a newer version.\*(CX .ES .fi \*(CDCopyright \(co 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, -2007 Free Software Foundation, Inc. +2007, 2009 Free Software Foundation, Inc. .sp .5 Permission is granted to make and distribute verbatim copies of this reference card provided the copyright notice and this permission notice @@ -1957,4 +1960,11 @@ reference card into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation.\*(CX .EB "\s+2\f(HBCOPYING PERMISSIONS\*(FR\s0" +.\" Need the BT here to get the final page number + +.ES +\*(CX +.sp 28 +.EB "\s+2\f(HBNOTES\*(FR\s0" + .BT @@ -22,7 +22,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Oct 19 2007" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Jul 10 2009" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -190,6 +190,19 @@ They are ignored by since .I gawk has no pre-defined limits. +(Current versions of the Bell Laboratories +.I awk +no longer accept them.) +.TP +.PD 0 +.B \-O +.TP +.PD +.B \-\^\-optimize +Enable optimizations upon the internal representation of the program. +Currently, this includes just simple constant-folding. The +.I gawk +maintainer hopes to add additional optimizations over time. .TP .PD 0 .B "\-W compat" @@ -491,7 +504,6 @@ This is also useful when reporting bugs. .IR "GNU Coding Standards" , these options cause an immediate, successful exit.) .TP -.PD 0 .B \-\^\- Signal the end of options. This is useful to allow further arguments to the \*(AK program itself to start with a \*(lq\-\*(rq. @@ -1909,7 +1921,7 @@ below.) .PP The .BR getline -command returns 0 on end of file and \-1 on an error. +command returns 1 on success, 0 on end of file, and \-1 on an error. Upon an error, .B ERRNO contains a string describing the problem. @@ -3467,15 +3479,23 @@ Scott Deifik is the current DOS maintainer. Pat Rankin did the port to VMS, and Michal Jaegermann did the port to the Atari ST. The port to OS/2 was done by Kai Uwe Rommel, with contributions and help from Darrel Hankerson. -Juan M.\& Guerrero now maintains the OS/2 port. +Andreas Buening now maintains the OS/2 port. Fred Fish supplied support for the Amiga, and Martin Brown provided the BeOS port. Stephen Davies provided the original Tandem port, and Matthew Woehlke provided changes for Tandem's POSIX-compliant systems. +Ralf Wildenhues now maintains that port. +.PP +See the +.I README +file in the +.I gawk +distribution for current information about maintainers +and which ports are currently supported. .SH VERSION INFORMATION This man page documents .IR gawk , -version 3.1.6. +version 3.1.7. .SH BUG REPORTS If you find a bug in .IR gawk , @@ -3525,7 +3545,7 @@ provided valuable assistance during testing and debugging. We thank him. .SH COPYING PERMISSIONS Copyright \(co 1989, 1991, 1992, 1993, 1994, 1995, 1996, -1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007 +1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of diff --git a/doc/gawk.info b/doc/gawk.info index 98e33fba..78249fcb 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10,15 +10,15 @@ START-INFO-DIR-ENTRY END-INFO-DIR-ENTRY Copyright (C) 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. This is Edition 3 of `GAWK: Effective AWK Programming: A User's -Guide for GNU Awk', for the 3.1.6 (or later) version of the GNU +Guide for GNU Awk', for the 3.1.7 (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -27,9 +27,9 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) a. "A GNU Manual" - b. "You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development." + b. "You have the freedom to copy and modify this GNU manual. Buying + copies from the FSF supports it in developing GNU and promoting + software freedom." File: gawk.info, Node: Top, Next: Foreword, Up: (dir) @@ -41,15 +41,15 @@ This file documents `awk', a program that you can use to select particular records in a file and perform operations upon them. Copyright (C) 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. This is Edition 3 of `GAWK: Effective AWK Programming: A User's -Guide for GNU Awk', for the 3.1.6 (or later) version of the GNU +Guide for GNU Awk', for the 3.1.7 (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -58,9 +58,9 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) a. "A GNU Manual" - b. "You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development." + b. "You have the freedom to copy and modify this GNU manual. Buying + copies from the FSF supports it in developing GNU and promoting + software freedom." * Menu: @@ -129,6 +129,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Comments:: Adding documentation to `gawk' programs. * Quoting:: More discussion of shell quoting issues. +* DOS Quoting:: Quoting in MS-DOS Batch Files. * Sample Data Files:: Sample data files for use in the `awk' programs illustrated in this Info file. @@ -330,6 +331,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * AWKPATH Variable:: Searching directories for `awk' programs. * Obsolete:: Obsolete Options and/or features. +* Exit Status:: `gawk''s exit status. * Undocumented:: Undocumented Options and Features. * Known Bugs:: Known Bugs in `gawk'. * Library Names:: How to best name private global variables @@ -381,6 +383,8 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Simple Sed:: A Simple Stream Editor. * Igawk Program:: A wrapper for `awk' that includes files. +* Signature Program:: People do amazing things with too much time + on their hands. * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. * SVR4:: Minor changes between System V Releases 3.1 @@ -939,14 +943,27 @@ File: gawk.info, Node: How To Contribute, Next: Acknowledgments, Prev: Manual How to Contribute ================= -As the maintainer of GNU `awk', I am starting a collection of publicly -available `awk' programs. For more information, see -`ftp://ftp.freefriends.org/arnold/Awkstuff'. If you have written an -interesting `awk' program, or have written a `gawk' extension that you -would like to share with the rest of the world, please contact me -(<arnold@skeeve.com>). Making things available on the Internet helps +As the maintainer of GNU `awk', I once thought that I would be able to +manage a collection of publicly available `awk' programs and I even +solicited contributions. Making things available on the Internet helps keep the `gawk' distribution down to manageable size. + The initial collection of material, such as it is, is still available +at `ftp://ftp.freefriends.org/arnold/Awkstuff'. In the hopes of doing +something more broad, I acquired the `awk.info' domain. + + However, I found that I could not dedicate enough time to managing +contributed code: the archive did not grow and the domain went unused +for several years. + + Fortunately, late in 2008, a volunteer took on the task of setting up +an `awk'-related web site `http://awk.info' and did a very nice job. + + If you have written an interesting `awk' program, or have written a +`gawk' extension that you would like to share with the rest of the +world, please see `http://awk.info/?contribute' for how to contribute +it to the web site. + File: gawk.info, Node: Acknowledgments, Prev: How To Contribute, Up: Preface @@ -1001,11 +1018,11 @@ Ulrich Drepper, provided invaluable help and feedback for the design of the internationalization features. Nelson Beebe, Martin Brown, Andreas Buening, Scott Deifik, Darrel -Hankerson, Isamu Hasegawa, Michal Jaegermann, Ju"rgen Kahrs, Pat Rankin, -Kai Uwe Rommel, and Eli Zaretskii (in alphabetical order) make up the -`gawk' "crack portability team." Without their hard work and help, -`gawk' would not be nearly the fine program it is today. It has been -and continues to be a pleasure working with this team of fine people. +Hankerson, Michal Jaegermann, Ju"rgen Kahrs, Pat Rankin, Kai Uwe Rommel, +and Eli Zaretskii (in alphabetical order) make up the `gawk' "crack +portability team." Without their hard work and help, `gawk' would not +be nearly the fine program it is today. It has been and continues to +be a pleasure working with this team of fine people. David and I would like to thank Brian Kernighan of Bell Laboratories for invaluable assistance during the testing and debugging of `gawk', @@ -1357,7 +1374,11 @@ File: gawk.info, Node: Quoting, Prev: Comments, Up: Running gawk 1.1.6 Shell-Quoting Issues -------------------------- -For short to medium length `awk' programs, it is most convenient to +* Menu: + +* DOS Quoting:: Quoting in MS-DOS Batch Files. + + For short to medium length `awk' programs, it is most convenient to enter the program on the `awk' command line. This is best done by enclosing the entire program in single quotes. This is true whether you are entering the program interactively at the shell prompt, or @@ -1465,6 +1486,24 @@ program, it is probably best to move it into a separate file, where the shell won't be part of the picture, and you can say what you mean. +File: gawk.info, Node: DOS Quoting, Up: Quoting + +1.1.6.1 Quoting in MS-DOS Batch Files +..................................... + +Although this Info file generally only worries about POSIX systems and +the POSIX shell, the following issue arises often enough for many users +that it is worth addressing. + + Systems providing an MS-DOS compatible "shell" use the double-quote +character for quoting, and make it difficult or impossible to include an +escaped double-quote character in a command-line script. The following +example, courtesy of Jeroen Brink, shows how to print all lines in a +file surrounded by double quotes: + + gawk "{ print \"\042\" $0 \"\042\" }" FILE + + File: gawk.info, Node: Sample Data Files, Next: Very Simple, Prev: Running gawk, Up: Getting Started 1.2 Data Files for the Examples @@ -1608,7 +1647,7 @@ different ways to do the same things shown here: expand data | awk '{ if (x < length()) x = length() } END { print "maximum line length is " x }' - The input is processed by the `expand' utility to change tabs into + The input is processed by the `expand' utility to change TABs into spaces, so the widths compared are actually the right-margin columns. @@ -3330,7 +3369,7 @@ characters carefully to prevent such problems. (If the data is not in a form that is easy to process, perhaps you can massage it first with a separate `awk' program.) - Fields are normally separated by whitespace sequences (spaces, tabs, + Fields are normally separated by whitespace sequences (spaces, TABs, and newlines), not by single spaces. Two spaces in a row do not delimit an empty field. The default value of the field separator `FS' is a string containing a single space, `" "'. If `awk' interpreted @@ -3373,9 +3412,9 @@ expression matches a single space and nothing else (*note Regexp::). There is an important difference between the two cases of `FS = " "' (a single space) and `FS = "[ \t\n]+"' (a regular expression matching -one or more spaces, tabs, or newlines). For both values of `FS', +one or more spaces, TABs, or newlines). For both values of `FS', fields are separated by "runs" (multiple adjacent occurrences) of -spaces, tabs, and/or newlines. However, when the value of `FS' is +spaces, TABs, and/or newlines. However, when the value of `FS' is `" "', `awk' first strips leading and trailing whitespace from the record and then decides where the fields are. For example, the following pipeline prints `b': @@ -3406,6 +3445,35 @@ concatenating `$1' through `$NF' together, separated by the value of it is not part of the new `$0'. Finally, the last `print' statement prints the new `$0'. + There is an additional subtlety to be aware of when using regular +exressions for field splitting. It is not well-specified in the POSIX +standard, or anywhere else, what `^' means when splitting fields. Does +the `^' match only at the beginning of the entire record? Or is each +field separator a new string? It turns out that different `awk' +versions answer this question differently, and you should not rely on +any specific behavior in your programs. (d.c.) + + As a point of information, the Bell Labs `awk' allows `^' to match +only at the beginning of the record. Versions of `gawk' after 3.1.6 +also work this way. For example: + + $ echo 'xxAA xxBxx C' | + > nawk -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i }' + -| --><-- + -| -->AA<-- + -| -->xxBxx<-- + -| -->C<-- + + $ echo 'xxAA xxBxx C' | + > gawk-3.1.6 -F '(^x+)|( +)' '{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i }' + -| --><-- + -| -->AA<-- + -| --><-- + -| -->Bxx<-- + -| -->C<-- + +As mentioned, `gawk' now behaves like the Bell Labs `awk'. + File: gawk.info, Node: Single Character Fields, Next: Command Line Field Separator, Prev: Regexp Field Splitting, Up: Field Separators @@ -3468,7 +3536,7 @@ separator. argument to `-F' is `t', then `FS' is set to the TAB character. If you type `-F\t' at the shell, without any quotes, the `\' gets deleted, so `awk' figures that you really want your fields to be separated with -tabs and not `t's. Use `-v FS="t"' or `-F"[t]"' on the command line if +TABs and not `t's. Use `-v FS="t"' or `-F"[t]"' on the command line if you really do want to separate your fields with `t's. For example, let's use an `awk' program file called `baud.awk' that @@ -3910,6 +3978,7 @@ processing on the next record _right now_. For example: # value of `tmp' will be "" if t is 1 tmp = substr($0, 1, t - 1) u = index(substr($0, t + 2), "*/") + offset = t + 2 while (u == 0) { if (getline <= 0) { m = "unexpected EOF or error" @@ -3918,10 +3987,11 @@ processing on the next record _right now_. For example: exit } u = index($0, "*/") + offset = 0 } # substr expression will be "" if */ # occurred at end of line - $0 = tmp substr($0, u + 2) + $0 = tmp substr($0, offset + u + 2) } print $0 } @@ -4552,6 +4622,17 @@ width. Here is a list of the format-control letters: 65' outputs the letter `A'. (The output for a string value is the first character of the string.) + NOTE: The `%c' format does _not_ handle values outside the + range 0-255. On most systems, values from 0-127 are within + the range of ASCII and will yield an ASCII character. Values + in the range 128-255 may format as characters in some + extended character set, or they may not. System 390 (IBM + architecture mainframe) systems use 8-bit characters, and + thus values from 0-255 yield the corresponding EBCDIC + character. Any value above 255 is treated as modulo 255; + i.e., the lowest eight bits of the value are used. The + locale and character set are always ignored. + `%d, %i' These are equivalent; they both print a decimal integer. (The `%i' specification is for compatibility with ISO C.) @@ -5767,7 +5848,7 @@ Variables::). Numbers are converted using the `sprintf' function with `CONVFMT' as the format specifier (*note String Functions::). `CONVFMT''s default value is `"%.6g"', which prints a value with at -least six significant digits. For some applications, you might want to +most six significant digits. For some applications, you might want to change it to specify more precision. On most modern machines, 17 digits is enough to capture a floating-point number's value exactly, most of the time.(1) @@ -6353,10 +6434,10 @@ these rules: STRING attribute. * Fields, `getline' input, `FILENAME', `ARGV' elements, `ENVIRON' - elements, and the elements of an array created by `split' that are - numeric strings have the STRNUM attribute. Otherwise, they have - the STRING attribute. Uninitialized variables also have the - STRNUM attribute. + elements, and the elements of an array created by `split' and + `match' that are numeric strings have the STRNUM attribute. + Otherwise, they have the STRING attribute. Uninitialized + variables also have the STRNUM attribute. * Attributes propagate across assignments but are not changed by any use. @@ -7899,6 +7980,10 @@ statement with a nonzero argument, as shown in the following example: close("date") } + For full portability, exit values should be between zero and 126, +inclusive. Negative values, and values of 127 or greater, may not +produce consistent results across different operating systems. + File: gawk.info, Node: Built-in Variables, Prev: Statements, Up: Patterns and Actions @@ -7939,12 +8024,14 @@ specific to `gawk' are marked with a pound sign (`#'). On non-POSIX systems, this variable specifies use of binary mode for all I/O. Numeric values of one, two, or three specify that input files, output files, or all files, respectively, should use - binary I/O. Alternatively, string values of `"r"' or `"w"' - specify that input files and output files, respectively, should - use binary I/O. A string value of `"rw"' or `"wr"' indicates that - all files should use binary I/O. Any other string value is - equivalent to `"rw"', but `gawk' generates a warning message. - `BINMODE' is described in more detail in *note PC Using::. + binary I/O. A numeric value less than zero is treated as zero, + and a numeric value greater than three is treated as three. + Alternatively, string values of `"r"' or `"w"' specify that input + files and output files, respectively, should use binary I/O. A + string value of `"rw"' or `"wr"' indicates that all files should + use binary I/O. Any other string value is equivalent to `"rw"', + but `gawk' generates a warning message. `BINMODE' is described in + more detail in *note PC Using::. This variable is a `gawk' extension. In other `awk' implementations (except `mawk', *note Other Versions::), or if @@ -7979,8 +8066,8 @@ specific to `gawk' are marked with a pound sign (`#'). The default value is `" "', a string consisting of a single space. As a special exception, this value means that any sequence of - spaces, tabs, and/or newlines is a single separator.(1) It also - causes spaces, tabs, and newlines at the beginning and end of a + spaces, TABs, and/or newlines is a single separator.(1) It also + causes spaces, TABs, and newlines at the beginning and end of a record to be ignored. You can set the value of `FS' on the command line using the `-F' @@ -9367,7 +9454,21 @@ with a pound sign (`#'): for programs to be maximally portable, always supply the parentheses. - Beginning with `gawk' version 3.2, when supplied an array + If `length' is called with a variable that has not been used, + `gawk' forces the variable to be a scalar. Other implementations + of `awk' leave the variable without a type. (d.c.) Consider: + + $ gawk 'BEGIN { print length(x) ; x[1] = 1 }' + -| 0 + error--> gawk: fatal: attempt to use scalar `x' as array + + $ nawk 'BEGIN { print length(x) ; x[1] = 1 }' + -| 0 + + If `--lint' has been specified on the command line, `gawk' issues a + warning about this. + + Beginning with `gawk' version 3.1.5, when supplied an array argument, the `length' function returns the number of elements in the array. This is less useful than it might seem at first, as the array is not guaranteed to be indexed from one to the number of @@ -9979,7 +10080,8 @@ parameters are enclosed in square brackets ([ ]): allow no argument at all. In this case, the buffer for the standard output is flushed. The second is to allow the null string (`""') as the argument. In this case, the buffers for _all_ open - output files and pipes are flushed. + output files and pipes are flushed. Current versions of the Bell + Labs `awk' also support these extensions. `fflush' returns zero if the buffer is successfully flushed; otherwise, it returns -1. In the case where all buffers are @@ -10628,12 +10730,16 @@ underscores that doesn't start with a digit. Within a single `awk' program, any particular name can only be used as a variable, array, or function. - PARAMETER-LIST is a list of the function's arguments and local -variable names, separated by commas. When the function is called, the -argument names are used to hold the argument values given in the call. -The local variables are initialized to the empty string. A function -cannot have two parameters with the same name, nor may it have a -parameter with the same name as the function itself. + PARAMETER-LIST is an optional list of the function's arguments and +local variable names, separated by commas. When the function is called, +the argument names are used to hold the argument values given in the +call. The local variables are initialized to the empty string. A +function cannot have two parameters with the same name, nor may it have +a parameter with the same name as the function itself. + + According to the POSIX standard, function parameters cannot have the +same name as one of the special built-in variables (*note Built-in +Variables::. Not all versions of `awk' enforce this restriction. The BODY-OF-FUNCTION consists of `awk' statements. It is the most important part of the definition, because it says what the function @@ -10796,7 +10902,7 @@ a string concatenation): foo(x y, "lose", 4 * z) - *Caution:* Whitespace characters (spaces and tabs) are not allowed + *Caution:* Whitespace characters (spaces and TABs) are not allowed between the function name and the open-parenthesis of the argument list. If you write whitespace by mistake, `awk' might think that you mean to concatenate a variable with an expression in parentheses. However, it @@ -11993,7 +12099,7 @@ output. The rules are as follows: counts next to the statements in the body show how many times those statements were executed. - * The layout uses "K&R" style with tabs. Braces are used + * The layout uses "K&R" style with TABs. Braces are used everywhere, even when the body of an `if', `else', or loop is only a single statement. @@ -12096,6 +12202,7 @@ full details. * AWKPATH Variable:: Searching directories for `awk' programs. * Obsolete:: Obsolete Options and/or features. +* Exit Status:: `gawk''s exit status. * Undocumented:: Undocumented Options and Features. * Known Bugs:: Known Bugs in `gawk'. @@ -12198,6 +12305,13 @@ options and their meanings are as follows: as well as options available in the Bell Laboratories version of `awk'. The following list describes `gawk'-specific options: +`-O' +`--optimize' + Enables some optimizations on the internal representation of the + program. At the moment this includes just simple constant + folding. The `gawk' maintainer hopes to add more optimizations + over time. + `-W compat' `-W traditional' `--compat' @@ -12548,9 +12662,27 @@ the value of `$(datadir)' generated when `gawk' was configured. You probably don't need to worry about this, though. -File: gawk.info, Node: Obsolete, Next: Undocumented, Prev: AWKPATH Variable, Up: Invoking Gawk +File: gawk.info, Node: Exit Status, Next: Undocumented, Prev: Obsolete, Up: Invoking Gawk + +11.5 `gawk''s Exit Status +========================= + +If the `exit' statement is used with a value (*note Exit Statement::), +the `gawk' exits with the numeric value given to it. + + Otherwise, if there were no problems during execution, `gawk' exits +with the value of the C constant `EXIT_SUCCESS'. This is usually zero. + + If an error occurs, `gawk' exits with the value of the C constant +`EXIT_FAILURE'. This is usually one. + + If `gawk' exits because of a fatal error, the exit status is 2. On +non-POSIX systems, this value may be mapped to `EXIT_FAILURE'. + + +File: gawk.info, Node: Obsolete, Next: Exit Status, Prev: AWKPATH Variable, Up: Invoking Gawk -11.5 Obsolete Options and/or Features +11.6 Obsolete Options and/or Features ===================================== This minor node describes features and/or command-line options from @@ -12571,9 +12703,9 @@ Process::, work as described, but are now considered deprecated. the next release of `gawk'. -File: gawk.info, Node: Undocumented, Next: Known Bugs, Prev: Obsolete, Up: Invoking Gawk +File: gawk.info, Node: Undocumented, Next: Known Bugs, Prev: Exit Status, Up: Invoking Gawk -11.6 Undocumented Options and Features +11.7 Undocumented Options and Features ====================================== Use the Source, Luke! @@ -12584,7 +12716,7 @@ File: gawk.info, Node: Undocumented, Next: Known Bugs, Prev: Obsolete, Up: I File: gawk.info, Node: Known Bugs, Prev: Undocumented, Up: Invoking Gawk -11.7 Known Bugs in `gawk' +11.8 Known Bugs in `gawk' ========================= * The `-F' option for changing the value of `FS' (*note Options::) @@ -13051,7 +13183,7 @@ your awk's `printf' does unbiased rounding: # see if fractional part if (ival == x) # no fraction - return x + return ival # ensure no decimals if (x < 0) { aval = -x # absolute value @@ -13487,9 +13619,9 @@ program to your `awk' program: } } - In `gawk', the `getline' won't be fatal (unless `--posix' is in -force). Removing the element from `ARGV' with `delete' skips the file -(since it's no longer in the list). + This works, because the `getline' won't be fatal. Removing the +element from `ARGV' with `delete' skips the file (since it's no longer +in the list). File: gawk.info, Node: Empty Files, Next: Ignoring Assigns, Prev: File Checking, Up: Data File Management @@ -14417,7 +14549,7 @@ File: gawk.info, Node: Cut Program, Next: Egrep Program, Up: Clones The `cut' utility selects, or "cuts," characters or fields from its standard input and sends them to its standard output. Fields are -separated by tabs by default, but you may supply a command-line option +separated by TABs by default, but you may supply a command-line option to change the field "delimiter" (i.e., the field-separator character). `cut''s definition of fields is less general than `awk''s. @@ -15215,7 +15347,7 @@ usage is as follows: `-N' Skip N fields before comparing lines. The definition of fields is similar to `awk''s default: nonwhitespace characters separated by - runs of spaces and/or tabs. + runs of spaces and/or TABs. `+N' Skip N characters before comparing lines. Any fields specified @@ -15425,7 +15557,7 @@ the following list: `-w' Count only words. A "word" is a contiguous sequence of - nonwhitespace characters, separated by spaces and/or tabs. + nonwhitespace characters, separated by spaces and/or TABs. Luckily, this is the normal way `awk' separates fields in its input data. @@ -15568,6 +15700,8 @@ hope you find them both interesting and enjoyable. * Simple Sed:: A Simple Stream Editor. * Igawk Program:: A wrapper for `awk' that includes files. +* Signature Program:: People do amazing things with too much time + on their hands. File: gawk.info, Node: Dupword Program, Next: Alarm Program, Up: Miscellaneous Programs @@ -15787,8 +15921,8 @@ first, `stranslate', takes three arguments: Associative arrays make the translation part fairly easy. `t_ar' holds the "to" characters, indexed by the "from" characters. Then a simple loop goes through `from', one character at a time. For each -character in `from', if the character appears in `target', `gsub' is -used to change it to the corresponding `to' character. +character in `from', if the character appears in `target', it is +replaced with the corresponding `to' character. The `translate' function simply calls `stranslate' using `$0' as the target. The main program sets two global variables, `FROM' and `TO', @@ -15803,21 +15937,24 @@ record: # to be spelled out. However, if `to' is shorter than `from', # the last character in `to' is used for the rest of `from'. - function stranslate(from, to, target, lf, lt, t_ar, i, c) + function stranslate(from, to, target, lf, lt, ltarget, t_ar, i, c, + result) { lf = length(from) lt = length(to) + ltarget = length(target) for (i = 1; i <= lt; i++) t_ar[substr(from, i, 1)] = substr(to, i, 1) if (lt < lf) for (; i <= lf; i++) t_ar[substr(from, i, 1)] = substr(to, lt, 1) - for (i = 1; i <= lf; i++) { - c = substr(from, i, 1) - if (index(target, c) > 0) - gsub(c, t_ar[c], target) + for (i = 1; i <= ltarget; i++) { + c = substr(target, i, 1) + if (c in t_ar) + c = t_ar[c] + result = result c } - return target + return result } function translate(from, to) @@ -16396,7 +16533,7 @@ the single rule handles the printing scheme outlined above, using `print' or `printf' as appropriate, depending upon the value of `RT'. -File: gawk.info, Node: Igawk Program, Prev: Simple Sed, Up: Miscellaneous Programs +File: gawk.info, Node: Igawk Program, Next: Signature Program, Prev: Simple Sed, Up: Miscellaneous Programs 13.3.9 An Easy Way to Use Library Functions ------------------------------------------- @@ -16783,6 +16920,33 @@ programming book if you wish to understand things in more depth. can loop forever if the file exists but is empty. Caveat emptor. +File: gawk.info, Node: Signature Program, Prev: Igawk Program, Up: Miscellaneous Programs + +13.3.10 And Now For Something Completely Different +-------------------------------------------------- + +The following program was written by Davide Brini and is published on +his website (http://db.netsons.org/v1-sigs.php). It serves as his +signature in the Usenet group `comp.lang.awk'. He supplies the +following copyright terms: + + Copyright (C) 2008 Davide Brini + + Copying and distribution of the code published in this page, with + or without modification, are permitted in any medium without + royalty provided the copyright notice and this notice are + preserved. + + Here is the program: + + awk 'BEGIN{O="~"~"~";o="=="=="==";o+=+o;x=O""O;while(X++<=x+o+o)c=c"%c"; + printf c,(x-O)*(x-O),x*(x-o)-o,x*(x-O)+x-O-o,+x*(x-O)-x+o,X*(o*o+O)+x-O, + X*(X-x)-o*o,(x+X)*o*o+o,x*(X-x)-O-O,x-O+(O+o+X+x)*(o+O),X*X-X*(x-O)-x+O, + O+X*(o*(o+O)+O),+x+O+X*o,x*(x-o),(o+X+x)*o*o-(x-O-O),O+(X-x)*(X+O),x-O}' + + We leave it to you to determine what the program does. + + File: gawk.info, Node: Language History, Next: Installation, Prev: Sample Programs, Up: Top Appendix A The Evolution of the `awk' Language @@ -17204,12 +17368,15 @@ all be disabled with either the `--traditional' or `--posix' options * The Atari port became officially unsupported (*note Atari Installation::). - * The source code now uses new-style function definitions, with - `ansi2knr' to convert the code on systems with old compilers. + * The source code now uses new-style function definitions. * The `--disable-lint' configuration option to disable lint checking at compile time (*note Additional Configuration Options::). + * The `--with-whiny-user-strftime' configuration option to force the + use of the included version of the `strftime' function for + deficient systems (*note Additional Configuration Options::). + * POSIX compliance for `sub' and `gsub' (*note Gory Details::). * The `--exec' option, for use in CGI scripts (*note Options::). @@ -17221,6 +17388,10 @@ all be disabled with either the `--traditional' or `--posix' options * The `strftime' function acquired a third argument to enable printing times as UTC (*note Time Functions::). + * The `--disable-libsigsegv' configuration option which disables + configuring, building, compiling and linking against the + `libsigsegv' library (*note Additional Configuration Options::). + File: gawk.info, Node: Contributors, Prev: POSIX/GNU, Up: Language History @@ -17399,20 +17570,20 @@ B.1.2 Extracting the Distribution `gawk' is distributed as a `tar' file compressed with the GNU Zip program, `gzip'. - Once you have the distribution (for example, `gawk-3.1.6.tar.gz'), + Once you have the distribution (for example, `gawk-3.1.7.tar.gz'), use `gzip' to expand the file and then use `tar' to extract it. You can use the following pipeline to produce the `gawk' distribution: # Under System V, add 'o' to the tar options - gzip -d -c gawk-3.1.6.tar.gz | tar -xvpf - + gzip -d -c gawk-3.1.7.tar.gz | tar -xvpf - -This creates a directory named `gawk-3.1.6' in the current directory. +This creates a directory named `gawk-3.1.7' in the current directory. The distribution file name is of the form `gawk-V.R.P.tar.gz'. The V represents the major version of `gawk', the R represents the current release of version V, and the P represents a "patch level", meaning that minor bugs have been fixed in the release. The current patch -level is 6, but when retrieving distributions, you should get the +level is 7, but when retrieving distributions, you should get the version with the highest version, release, and patch level. (Note, however, that patch levels greater than or equal to 80 denote "beta" or nonproduction software; you might not want to retrieve such a version @@ -17598,7 +17769,7 @@ B.2.1 Compiling `gawk' for Unix ------------------------------- After you have extracted the `gawk' distribution, `cd' to -`gawk-3.1.6'. Like most GNU software, `gawk' is configured +`gawk-3.1.7'. Like most GNU software, `gawk' is configured automatically for your Unix system by running the `configure' program. This program is a Bourne shell script that is generated automatically using GNU `autoconf'. (The `autoconf' software is described fully @@ -17652,6 +17823,10 @@ command line when compiling `gawk' from scratch, including: Enable the recognition and execution of C-style `switch' statements in `awk' programs (*note Switch Statement::.) +`--with-whiny-user-strftime' + Force use of the included version of the `strftime' function for + deficient systems + `--disable-lint' This option disables all lint checking within `gawk'. The `--lint' and `--lint-old' options (*note Options::) are accepted, @@ -17676,6 +17851,11 @@ command line when compiling `gawk' from scratch, including: Causes `gawk' to silently skip directories named on the command line. +`--disable-libsigsegv' + The `--disable-libsigsegv' configuration option disables + configuring, building, compiling and linking against the + `libsigsegv' library. + As of version 3.1.5, the `--with-included-gettext' configuration option is no longer available, since `gawk' expects the GNU `gettext' library to be installed as an external library. @@ -17977,8 +18157,7 @@ child processes are not started by `fork()'. NOTE: Most OS/2 ports of GNU `make' are not able to handle the Makefiles of this package. If you encounter any problems with `make' try GNU Make 3.79.1 or later versions. You should find the - latest version on `http://www.unixos2.org/sw/pub/binary/make/' or - on `ftp://hobbes.nmsu.edu/pub/os2/'. + latest version on `ftp://hobbes.nmsu.edu/pub/os2/'. File: gawk.info, Node: PC Dynamic, Next: PC Using, Prev: PC Compiling, Up: PC Installation @@ -18071,14 +18250,14 @@ translate end-of-line `"\r\n"' to `"\n"' on input and `"\n"' to `"\r\n"' on output. A special `BINMODE' variable allows control over these translations and is interpreted as follows: - * If `BINMODE' is `"r"', or `(BINMODE & 1)' is nonzero, then binary - mode is set on read (i.e., no translations on reads). + * If `BINMODE' is `"r"', or one, then binary mode is set on read + (i.e., no translations on reads). - * If `BINMODE' is `"w"', or `(BINMODE & 2)' is nonzero, then binary - mode is set on write (i.e., no translations on writes). + * If `BINMODE' is `"w"', or two, then binary mode is set on write + (i.e., no translations on writes). - * If `BINMODE' is `"rw"' or `"wr"', binary mode is set for both read - and write (same as `(BINMODE & 3)'). + * If `BINMODE' is `"rw"' or `"wr"' or three, binary mode is set for + both read and write. * `BINMODE=NON-NULL-STRING' is the same as `BINMODE=3' (i.e., no translations on reads or writes). However, `gawk' issues a warning @@ -18137,8 +18316,8 @@ simulation of Unix, using the GNU tools, such as `bash', the GNU Compiler Collection (GCC), GNU Make, and other GNU tools. Compilation and installation for Cygwin is the same as for a Unix system: - tar -xvpzf gawk-3.1.6.tar.gz - cd gawk-3.1.6 + tar -xvpzf gawk-3.1.7.tar.gz + cd gawk-3.1.7 ./configure make @@ -18549,6 +18728,18 @@ do occasionally read this newsgroup, there is no guarantee that we will see your posting. The steps described above are the official recognized ways for reporting bugs. + NOTE: Many distributions of GNU/Linux and the various BSD-based + operating systems have their own bug reporting systems. If you + report a bug using your distribution's bug reporting system, + _please_ also send a copy to <bug-gawk@gnu.org>. + + This is for two reasons. First, while some distributions forward + bug reports "upstream" to the GNU mailing list, many don't, so + there is a good chance that the `gawk' maintainer won't even see + the bug report! Second, mail to the GNU list is archived, and + having everything at the GNU project keeps things self-contained + and not dependant on other web sites. + Non-bug suggestions are always welcome as well. If you have questions about things that are unclear in the documentation or are just obscure features, ask me; I will try to help you out, although I @@ -18563,15 +18754,12 @@ considered authoritative if it conflicts with this Info file. The people maintaining the non-Unix ports of `gawk' are as follows: -Amiga Fred Fish, <fnf@ninemoons.com>. -BeOS Martin Brown, <mc@whoever.com>. -MS-DOS Scott Deifik, <scottd.mail@sbcglobal.net> and Darrel - Hankerson, <hankedr@mail.auburn.edu>. -MS-Windows Juan Grigera, <juan@biophnet.unlp.edu.ar>. -OS/2 The Unix for OS/2 team, - <gawk-maintainer@unixos2.org>. -Tandem Stephen Davies, <scldad@sdc.com.au>. -VMS Pat Rankin, <rankin@pactechdata.com>. +MS-DOS Scott Deifik, <scottd.mail@sbcglobal.net>. +OS/2 Andreas Buening, <andreas.buening@nexgo.de> +Tandem Stephen Davies, <scldad@sdc.com.au>. +Tandem (POSIX-compliant) Ralf Wildenhues <Ralf.Wildenhues@gmx.de> +VMS Pat Rankin, <rankin@pactechdata.com>. +z/OS (OS/390) Dave Pitts, <pitts@cozx.com>. If your bug is also reproducible under Unix, please send a copy of your report to the <bug-gawk@gnu.org> email list as well. @@ -18595,13 +18783,13 @@ Unix `awk' from his home page.(1) It is available in several archive formats: Shell archive - `http://cm.bell-labs.com/who/bwk/awk.shar' + `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.shar' Compressed `tar' file - `http://cm.bell-labs.com/who/bwk/awk.tar.gz' + `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz' Zip file - `http://cm.bell-labs.com/who/bwk/awk.zip' + `http://www.cs.princeton.edu/~bwk/btl.mirror/awk.zip' This version requires an ISO C (1990 standard) compiler; the C compiler from GCC (the GNU Compiler Collection) works quite nicely. @@ -18614,13 +18802,17 @@ Unix `awk' called `mawk'. It is available under the GPL (*note Copying::), just as `gawk' is. - You can get it via anonymous `ftp' to the host `ftp.whidbey.net'. - Change directory to `/pub/brennan'. Use "binary" or "image" mode, - and retrieve `mawk1.3.3.tar.gz' (or the latest version that is - there). + The original distribution site for the `mawk' source code no + longer has it. A copy has been made available at + `http://www.skeeve.com/gawk/mawk1.3.3.tar.gz'. + + In 2009, Thomas Dickey took on `mawk' maintenance. Basic + information is availabe on the project's web page + (http://www.invisible-island.net/mawk/mawk.html). The download + URL is `ftp://invisible-island.net/mawk/mawk.tar.gz'. - `gunzip' may be used to decompress this file. Installation is - similar to `gawk''s (*note Unix Installation::). + Once you have it, `gunzip' may be used to decompress this file. + Installation is similar to `gawk''s (*note Unix Installation::). `mawk' has the following extensions that are not in POSIX `awk': @@ -18650,7 +18842,8 @@ Unix `awk' * The `BINMODE' special variable for non-Unix operating systems (*note PC Using::). - The next version of `mawk' will support `nextfile'. + It is to be hoped that a future version of `mawk' will support + `nextfile' (*note Nextfile Statement::). `awka' Written by Andrew Sumner, `awka' translates `awk' programs into C, @@ -18669,8 +18862,8 @@ Unix `awk' Labs `awk' to provide timing and profiling information. It is different from `pgawk' (*note Profiling::), in that it uses CPU-based profiling, not line-count profiling. You may find it at - either `ftp://ftp.math.utah.edu/pub/pawk/pawk-20020210.tar.gz' or - `http://www.math.utah.edu/pub/pawk/pawk-20020210.tar.gz'. + either `ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz' or + `http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz'. The OpenSolaris POSIX `awk' The version of `awk' in `/usr/xpg4/bin' on Solaris is POSIX @@ -18688,10 +18881,16 @@ The OpenSolaris POSIX `awk' from POSIX `awk'. More information is available on the project's home page.(3). + This is an independent implementation of `awk' distributed under + the GPL. It has a large number of extensions over standard `awk' + and may not be 100% syntactically compatible with it. See + `http://www.quiktrim.org/QTawk.html' for more information, + including the manual and a download link. + ---------- Footnotes ---------- - (1) `http://cm.bell-labs.com/who/bwk' + (1) `http://www.cs.princeton.edu/~bwk' (2) `http://www.opensolaris.org' @@ -18796,7 +18995,7 @@ possible for me to include your changes: instructions in the `GNU Coding Standards', with minor exceptions. The code is formatted using the traditional "K&R" style, particularly as regards to the placement of braces and the use of - tabs. In brief, the coding rules for `gawk' are as follows: + TABs. In brief, the coding rules for `gawk' are as follows: * Use ANSI/ISO style (prototype) function headers when defining functions. @@ -18820,7 +19019,7 @@ possible for me to include your changes: effects, except in `for' loop initialization and increment parts, and in macro bodies. - * Use real tabs for indenting, not spaces. + * Use real TABs for indenting, not spaces. * Use the "K&R" brace layout style. @@ -21476,10 +21675,10 @@ File: gawk.info, Node: GNU Free Documentation License, Next: Index, Prev: Cop GNU Free Documentation License ****************************** - Version 1.2, November 2002 + Version 1.3, 3 November 2008 - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -21581,6 +21780,9 @@ GNU Free Documentation License Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + The "publisher" means any person or entity that distributes copies + of the Document to the public. + A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ @@ -21810,7 +22012,7 @@ GNU Free Documentation License a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual - works permit. When the Document is included an aggregate, this + works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. @@ -21846,12 +22048,29 @@ GNU Free Documentation License 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from + you under this License. If your rights have been terminated and + not permanently reinstated, receipt of a copy of some or all of + the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE @@ -21869,7 +22088,41 @@ GNU Free Documentation License published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the - Free Software Foundation. + Free Software Foundation. If the Document specifies that a proxy + can decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + ADDENDUM: How to use this License for your documents ==================================================== @@ -21880,10 +22133,10 @@ notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 + under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover @@ -21928,7 +22181,7 @@ Index * ! (exclamation point), !~ operator: Regexp Usage. (line 19) * ! operator <1>: Egrep Program. (line 168) * ! operator: Ranges. (line 48) -* " (double quote) <1>: Quoting. (line 33) +* " (double quote) <1>: Quoting. (line 37) * " (double quote): Read Terminal. (line 25) * " (double quote), regexp constants: Computed Regexps. (line 28) * # (number sign), #! (executable scripts): Executable Scripts. @@ -21948,11 +22201,11 @@ Index * & (ampersand), && operator <1>: Precedence. (line 87) * & (ampersand), && operator: Boolean Ops. (line 57) * & (ampersand), gsub/gensub/sub functions and: Gory Details. (line 6) -* ' (single quote) <1>: Quoting. (line 27) +* ' (single quote) <1>: Quoting. (line 31) * ' (single quote) <2>: Long. (line 33) * ' (single quote): One-shot. (line 15) * ' (single quote), vs. apostrophe: Comments. (line 27) -* ' (single quote), with double quotes: Quoting. (line 49) +* ' (single quote), with double quotes: Quoting. (line 53) * () (parentheses): Regexp Operators. (line 78) * () (parentheses), pgawk program: Profiling. (line 144) * * (asterisk), * operator, as multiplication operator: Precedence. @@ -21961,10 +22214,10 @@ Index (line 86) * * (asterisk), * operator, null strings, matching: Gory Details. (line 160) -* * (asterisk), ** operator <1>: Options. (line 192) +* * (asterisk), ** operator <1>: Options. (line 199) * * (asterisk), ** operator <2>: Precedence. (line 49) * * (asterisk), ** operator: Arithmetic Ops. (line 81) -* * (asterisk), **= operator <1>: Options. (line 192) +* * (asterisk), **= operator <1>: Options. (line 199) * * (asterisk), **= operator <2>: Precedence. (line 96) * * (asterisk), **= operator: Assignment Ops. (line 129) * * (asterisk), *= operator <1>: Precedence. (line 96) @@ -21986,55 +22239,61 @@ Index * - (hyphen), filenames beginning with: Options. (line 67) * - (hyphen), in character lists: Character Lists. (line 17) * --assign option: Options. (line 30) -* --compat option: Options. (line 79) -* --copyleft option: Options. (line 92) -* --copyright option: Options. (line 87) +* --compat option: Options. (line 86) +* --copyleft option: Options. (line 99) +* --copyright option: Options. (line 94) * --disable-directories-fatal configuration option: Additional Configuration Options. - (line 37) + (line 41) +* --disable-libsigsegv configuration option: Additional Configuration Options. + (line 45) * --disable-lint configuration option: Additional Configuration Options. - (line 17) + (line 21) * --disable-nls configuration option: Additional Configuration Options. - (line 32) + (line 36) * --dump-variables option <1>: Library Names. (line 45) -* --dump-variables option: Options. (line 95) +* --dump-variables option: Options. (line 102) * --enable-portals configuration option <1>: Additional Configuration Options. (line 9) * --enable-portals configuration option: Portal Files. (line 6) * --enable-switch configuration option: Additional Configuration Options. (line 13) -* --exec option: Options. (line 111) +* --exec option: Options. (line 118) * --field-separator option: Options. (line 21) * --file option: Options. (line 25) -* --gen-po option <1>: Options. (line 130) +* --gen-po option <1>: Options. (line 137) * --gen-po option: String Extraction. (line 6) -* --help option: Options. (line 139) -* --lint option <1>: Options. (line 144) +* --help option: Options. (line 146) +* --lint option <1>: Options. (line 151) * --lint option: Command Line. (line 20) -* --lint-old option: Options. (line 163) -* --non-decimal-data option <1>: Options. (line 168) +* --lint-old option: Options. (line 170) +* --non-decimal-data option <1>: Options. (line 175) * --non-decimal-data option: Nondecimal Data. (line 6) * --non-decimal-data option, strtonum function and: Nondecimal Data. (line 36) -* --posix option: Options. (line 176) -* --posix option, --traditional option and: Options. (line 206) -* --profile option <1>: Options. (line 212) +* --optimize option: Options. (line 77) +* --posix option: Options. (line 183) +* --posix option, --traditional option and: Options. (line 213) +* --profile option <1>: Options. (line 219) * --profile option: Profiling. (line 15) -* --re-interval option: Options. (line 224) -* --source option: Options. (line 231) -* --traditional option: Options. (line 79) -* --traditional option, --posix option and: Options. (line 206) -* --usage option: Options. (line 139) -* --use-lc-numeric option: Options. (line 239) -* --version option: Options. (line 244) +* --re-interval option: Options. (line 231) +* --source option: Options. (line 238) +* --traditional option: Options. (line 86) +* --traditional option, --posix option and: Options. (line 213) +* --usage option: Options. (line 146) +* --use-lc-numeric option: Options. (line 246) +* --version option: Options. (line 251) +* --with-whiny-user-strftime configuration option: Additional Configuration Options. + (line 17) * -f option: Options. (line 25) * -F option <1>: Options. (line 21) * -F option: Command Line Field Separator. (line 6) * -f option: Long. (line 12) -* -F option, -Ft sets FS to TAB: Options. (line 252) -* -f option, on command line: Options. (line 257) +* -F option, -Ft sets FS to TAB: Options. (line 259) +* -f option, on command line: Options. (line 264) * -F option, troubleshooting: Known Bugs. (line 6) * -mf/-mr options: Options. (line 45) +* -O option: Options. (line 77) * -v option: Options. (line 30) * -v option, variables, assigning: Assignment Options. (line 12) * -W option: Options. (line 55) @@ -22089,7 +22348,7 @@ Index * ? (question mark), ?: operator: Precedence. (line 93) * [] (square brackets): Regexp Operators. (line 55) * \ (backslash) <1>: Regexp Operators. (line 18) -* \ (backslash) <2>: Quoting. (line 27) +* \ (backslash) <2>: Quoting. (line 31) * \ (backslash) <3>: Comments. (line 50) * \ (backslash): Read Terminal. (line 25) * \ (backslash), \" escape sequence: Escape Sequences. (line 76) @@ -22137,12 +22396,14 @@ Index * ^ (caret) <1>: GNU Regexp Operators. (line 51) * ^ (caret): Regexp Operators. (line 22) -* ^ (caret), ^ operator <1>: Options. (line 192) +* ^ (caret), ^ operator <1>: Options. (line 199) * ^ (caret), ^ operator: Precedence. (line 49) -* ^ (caret), ^= operator <1>: Options. (line 192) +* ^ (caret), ^= operator <1>: Options. (line 199) * ^ (caret), ^= operator <2>: Precedence. (line 96) * ^ (caret), ^= operator: Assignment Ops. (line 129) * ^ (caret), in character lists: Character Lists. (line 17) +* ^, in FS: Regexp Field Splitting. + (line 59) * _ (underscore), _ C macro: Explaining gettext. (line 68) * _ (underscore), in names of private variables: Library Names. (line 29) @@ -22159,7 +22420,7 @@ Index * adding, features to gawk: Adding Code. (line 6) * adding, fields: Changing Fields. (line 53) * adding, functions to gawk: Dynamic Extensions. (line 10) -* advanced features, buffering: I/O Functions. (line 95) +* advanced features, buffering: I/O Functions. (line 96) * advanced features, close function: Close Files And Pipes. (line 130) * advanced features, constants, values of: Nondecimal-numbers. @@ -22266,10 +22527,10 @@ Index (line 86) * asterisk (*), * operator, null strings, matching: Gory Details. (line 160) -* asterisk (*), ** operator <1>: Options. (line 192) +* asterisk (*), ** operator <1>: Options. (line 199) * asterisk (*), ** operator <2>: Precedence. (line 49) * asterisk (*), ** operator: Arithmetic Ops. (line 81) -* asterisk (*), **= operator <1>: Options. (line 192) +* asterisk (*), **= operator <1>: Options. (line 199) * asterisk (*), **= operator <2>: Precedence. (line 96) * asterisk (*), **= operator: Assignment Ops. (line 129) * asterisk (*), *= operator <1>: Precedence. (line 96) @@ -22293,7 +22554,7 @@ Index * awk programs, location of: Options. (line 25) * awk programs, one-line examples: Very Simple. (line 45) * awk programs, profiling: Profiling. (line 6) -* awk programs, profiling, enabling: Options. (line 212) +* awk programs, profiling, enabling: Options. (line 219) * awk programs, running <1>: Long. (line 6) * awk programs, running: Running gawk. (line 6) * awk programs, running, from shell scripts: One-shot. (line 22) @@ -22327,15 +22588,15 @@ Index * awk, versions of, changes between V7 and SVR3.1: V7/SVR3.1. (line 6) * awk, versions of, See Also Bell Laboratories awk: BTL. (line 6) * awk.h file (internal): Internals. (line 15) -* awka compiler for awk: Other Versions. (line 76) +* awka compiler for awk: Other Versions. (line 81) * AWKNUM internal type: Internals. (line 19) * AWKPATH environment variable <1>: PC Using. (line 11) * AWKPATH environment variable: AWKPATH Variable. (line 6) * awkprof.out file: Profiling. (line 10) * awksed.awk program: Simple Sed. (line 25) -* awkvars.out file: Options. (line 95) +* awkvars.out file: Options. (line 102) * backslash (\) <1>: Regexp Operators. (line 18) -* backslash (\) <2>: Quoting. (line 27) +* backslash (\) <2>: Quoting. (line 31) * backslash (\) <3>: Comments. (line 50) * backslash (\): Read Terminal. (line 25) * backslash (\), \" escape sequence: Escape Sequences. (line 76) @@ -22382,7 +22643,7 @@ Index * backslash (\), regexp constants: Computed Regexps. (line 28) * BBS-list file: Sample Data Files. (line 6) * Beebe, Nelson: Acknowledgments. (line 53) -* Beebe, Nelson H.F.: Other Versions. (line 88) +* Beebe, Nelson H.F.: Other Versions. (line 93) * BEGIN pattern <1>: BEGIN/END. (line 6) * BEGIN pattern <2>: Field Separators. (line 43) * BEGIN pattern: Records. (line 29) @@ -22426,7 +22687,7 @@ Index * Boolean expressions: Boolean Ops. (line 6) * Boolean expressions, as patterns: Expression Patterns. (line 41) * Boolean operators, See Boolean expressions: Boolean Ops. (line 6) -* Bourne shell, quoting rules for: Quoting. (line 14) +* Bourne shell, quoting rules for: Quoting. (line 18) * braces ({}), actions and: Action Overview. (line 19) * braces ({}), pgawk program: Profiling. (line 140) * braces ({}), statements, grouping: Statements. (line 10) @@ -22437,16 +22698,16 @@ Index * Brennan, Michael <3>: Two-way I/O. (line 6) * Brennan, Michael: Delete. (line 51) * Broder, Alan J.: Contributors. (line 77) -* Brown, Martin <1>: Bugs. (line 57) -* Brown, Martin <2>: Contributors. (line 72) +* Brown, Martin <1>: Contributors. (line 72) * Brown, Martin: Acknowledgments. (line 53) * BSD portals: Portal Files. (line 6) * BSD-based operating systems: Glossary. (line 582) -* Buening, Andreas <1>: Contributors. (line 81) +* Buening, Andreas <1>: Bugs. (line 69) +* Buening, Andreas <2>: Contributors. (line 81) * Buening, Andreas: Acknowledgments. (line 53) * buffering, input/output <1>: Two-way I/O. (line 71) -* buffering, input/output: I/O Functions. (line 127) -* buffering, interactive vs. noninteractive: I/O Functions. (line 95) +* buffering, input/output: I/O Functions. (line 128) +* buffering, interactive vs. noninteractive: I/O Functions. (line 96) * buffers, flushing: I/O Functions. (line 29) * buffers, operators for: GNU Regexp Operators. (line 40) @@ -22463,21 +22724,21 @@ Index * caret (^) <1>: GNU Regexp Operators. (line 51) * caret (^): Regexp Operators. (line 22) -* caret (^), ^ operator <1>: Options. (line 192) +* caret (^), ^ operator <1>: Options. (line 199) * caret (^), ^ operator: Precedence. (line 49) -* caret (^), ^= operator <1>: Options. (line 192) +* caret (^), ^= operator <1>: Options. (line 199) * caret (^), ^= operator <2>: Precedence. (line 96) * caret (^), ^= operator: Assignment Ops. (line 129) * caret (^), in character lists: Character Lists. (line 17) * case keyword: Switch Statement. (line 6) * case sensitivity, array indices and: Array Intro. (line 87) -* case sensitivity, converting case: String Functions. (line 453) +* case sensitivity, converting case: String Functions. (line 467) * case sensitivity, example programs: Library Functions. (line 43) * case sensitivity, gawk: Case-sensitivity. (line 26) -* case sensitivity, regexps and <1>: User-modified. (line 68) +* case sensitivity, regexps and <1>: User-modified. (line 70) * case sensitivity, regexps and: Case-sensitivity. (line 6) -* case sensitivity, string comparisons and: User-modified. (line 68) -* CGI, awk scripts for: Options. (line 111) +* case sensitivity, string comparisons and: User-modified. (line 70) +* CGI, awk scripts for: Options. (line 118) * character encodings: Ordinal Functions. (line 44) * character lists <1>: Character Lists. (line 6) * character lists: Regexp Operators. (line 55) @@ -22548,7 +22809,7 @@ Index (line 60) * compatibility mode (gawk), octal numbers: Nondecimal-numbers. (line 60) -* compatibility mode (gawk), specifying: Options. (line 79) +* compatibility mode (gawk), specifying: Options. (line 86) * compiled programs <1>: Glossary. (line 156) * compiled programs: Basic High Level. (line 14) * compl function (gawk): Bitwise Functions. (line 43) @@ -22557,29 +22818,33 @@ Index * concatenating: Concatenation. (line 9) * conditional expressions: Conditional Exp. (line 6) * configuration option, --disable-directories-fatal: Additional Configuration Options. - (line 37) + (line 41) +* configuration option, --disable-libsigsegv: Additional Configuration Options. + (line 45) * configuration option, --disable-lint: Additional Configuration Options. - (line 17) + (line 21) * configuration option, --disable-nls: Additional Configuration Options. - (line 32) + (line 36) * configuration option, --enable-portals: Additional Configuration Options. (line 9) * configuration option, --enable-switch: Additional Configuration Options. (line 13) +* configuration option, --with-whiny-user-strftime: Additional Configuration Options. + (line 17) * configuration options, gawk: Additional Configuration Options. (line 6) * constants, nondecimal: Nondecimal Data. (line 6) * constants, types of: Constants. (line 6) * continue statement: Continue Statement. (line 6) * control statements: Statements. (line 6) -* converting, case: String Functions. (line 453) +* converting, case: String Functions. (line 467) * converting, dates to timestamps: Time Functions. (line 72) * converting, during subscripting: Numeric Array Subscripts. (line 31) * converting, numbers: Conversion. (line 6) * converting, numbers, to strings: Bitwise Functions. (line 99) * converting, strings to numbers: Conversion. (line 6) -* CONVFMT variable <1>: User-modified. (line 26) +* CONVFMT variable <1>: User-modified. (line 28) * CONVFMT variable: Conversion. (line 29) * CONVFMT variable, array subscripts and: Numeric Array Subscripts. (line 6) @@ -22592,7 +22857,7 @@ Index * counting: Wc Program. (line 6) * csh utility: Statements/Lines. (line 44) * csh utility, backslash continuation and: More Complex. (line 15) -* csh utility, POSIXLY_CORRECT environment variable: Options. (line 295) +* csh utility, POSIXLY_CORRECT environment variable: Options. (line 302) * csh utility, |& operator, comparison with: Two-way I/O. (line 44) * ctime user-defined function: Function Example. (line 72) * currency symbols, localization: Explaining gettext. (line 99) @@ -22606,6 +22871,8 @@ Index * dark corner <3>: Assignment Ops. (line 148) * dark corner <4>: Format Modifiers. (line 59) * dark corner: Conventions. (line 37) +* dark corner, ^, in FS: Regexp Field Splitting. + (line 59) * dark corner, array subscripts: Uninitialized Subscripts. (line 42) * dark corner, break statement: Break Statement. (line 47) @@ -22623,11 +22890,12 @@ Index * dark corner, FILENAME variable <1>: Auto-set. (line 88) * dark corner, FILENAME variable: Getline Notes. (line 19) * dark corner, FNR/NR variables: Auto-set. (line 187) -* dark corner, format-control characters: Control Letters. (line 80) +* dark corner, format-control characters: Control Letters. (line 18) * dark corner, FS as null string: Single Character Fields. (line 20) * dark corner, input files: Records. (line 98) * dark corner, invoking awk: Command Line. (line 16) +* dark corner, length function: String Functions. (line 88) * dark corner, multiline records: Multiple Line. (line 35) * dark corner, NF variable, decrementing: Changing Fields. (line 107) * dark corner, OFMT variable: OFMT. (line 27) @@ -22637,7 +22905,7 @@ Index (line 148) * dark corner, regexp constants, as arguments to user-defined functions: Using Constant Regexps. (line 44) -* dark corner, split function: String Functions. (line 220) +* dark corner, split function: String Functions. (line 234) * dark corner, strings, storing: Records. (line 186) * data, fixed-width: Constant Size. (line 9) * data-driven languages: Basic High Level. (line 83) @@ -22648,7 +22916,7 @@ Index * dates, converting to timestamps: Time Functions. (line 72) * dates, information related to, localization: Explaining gettext. (line 111) -* Davies, Stephen <1>: Bugs. (line 62) +* Davies, Stephen <1>: Bugs. (line 70) * Davies, Stephen: Contributors. (line 68) * dcgettext function (gawk) <1>: Programmer i18n. (line 19) * dcgettext function (gawk): I18N Functions. (line 12) @@ -22661,16 +22929,16 @@ Index * deadlocks: Two-way I/O. (line 71) * debugging gawk: Known Bugs. (line 6) * debugging gawk, bug reports: Bugs. (line 9) -* decimal point character, locale specific: Options. (line 200) +* decimal point character, locale specific: Options. (line 207) * decrement operators: Increment Ops. (line 35) * default keyword: Switch Statement. (line 6) -* Deifik, Scott <1>: Bugs. (line 58) +* Deifik, Scott <1>: Bugs. (line 69) * Deifik, Scott <2>: Contributors. (line 52) * Deifik, Scott: Acknowledgments. (line 53) * delete statement: Delete. (line 6) * deleting elements in arrays: Delete. (line 6) * deleting entire arrays: Delete. (line 39) -* differences between gawk and awk: String Functions. (line 88) +* differences between gawk and awk: String Functions. (line 102) * differences in awk and gawk, ARGC/ARGV variables: ARGC and ARGV. (line 85) * differences in awk and gawk, ARGIND variable: Auto-set. (line 40) @@ -22683,18 +22951,18 @@ Index * differences in awk and gawk, BINMODE variable <1>: PC Using. (line 40) * differences in awk and gawk, BINMODE variable: User-modified. - (line 21) + (line 23) * differences in awk and gawk, close function: Close Files And Pipes. (line 81) * differences in awk and gawk, ERRNO variable: Auto-set. (line 72) * differences in awk and gawk, error messages: Special FD. (line 15) * differences in awk and gawk, FIELDWIDTHS variable: User-modified. - (line 33) + (line 35) * differences in awk and gawk, function arguments (gawk): Calling Built-in. (line 16) * differences in awk and gawk, getline command: Getline. (line 19) * differences in awk and gawk, IGNORECASE variable: User-modified. - (line 68) + (line 70) * differences in awk and gawk, implementation limitations <1>: Redirection. (line 132) * differences in awk and gawk, implementation limitations: Getline Notes. @@ -22705,9 +22973,9 @@ Index (line 6) * differences in awk and gawk, line continuations: Conditional Exp. (line 34) -* differences in awk and gawk, LINT variable: User-modified. (line 83) +* differences in awk and gawk, LINT variable: User-modified. (line 85) * differences in awk and gawk, match function: String Functions. - (line 151) + (line 165) * differences in awk and gawk, next/nextfile statements: Nextfile Statement. (line 6) * differences in awk and gawk, print/printf statements: Format Modifiers. @@ -22723,13 +22991,13 @@ Index * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split function: String Functions. - (line 209) + (line 223) * differences in awk and gawk, strings: Scalar Constants. (line 20) * differences in awk and gawk, strings, storing: Records. (line 182) * differences in awk and gawk, strtonum function (gawk): String Functions. - (line 247) + (line 261) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. - (line 138) + (line 140) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. (line 66) * directories, changing: Sample Library. (line 6) @@ -22746,7 +23014,7 @@ Index * dollar sign ($), $ field operator: Fields. (line 19) * dollar sign ($), incrementing fields and arrays: Increment Ops. (line 30) -* double quote (") <1>: Quoting. (line 33) +* double quote (") <1>: Quoting. (line 37) * double quote ("): Read Terminal. (line 25) * double quote ("), regexp constants: Computed Regexps. (line 28) * double-precision floating-point: Basic Data Typing. (line 33) @@ -22803,7 +23071,7 @@ Index * error output: Special FD. (line 6) * escape processing, gsub/gensub/sub functions: Gory Details. (line 6) * escape sequences: Escape Sequences. (line 6) -* escape sequences, unrecognized: Options. (line 180) +* escape sequences, unrecognized: Options. (line 187) * evaluation order: Increment Ops. (line 61) * evaluation order, concatenation: Concatenation. (line 42) * evaluation order, functions: Calling Built-in. (line 30) @@ -22824,6 +23092,7 @@ Index * exclamation point (!), !~ operator <6>: Case-sensitivity. (line 26) * exclamation point (!), !~ operator: Regexp Usage. (line 19) * exit statement: Exit Statement. (line 6) +* exit status, of gawk: Exit Status. (line 6) * exp function: Numeric Functions. (line 22) * expand utility: Very Simple. (line 69) * expressions: Expressions. (line 6) @@ -22841,7 +23110,7 @@ Index (line 15) * extensions, Bell Laboratories awk: BTL. (line 6) * extensions, in gawk, not in POSIX awk: POSIX/GNU. (line 6) -* extensions, mawk: Other Versions. (line 46) +* extensions, mawk: Other Versions. (line 50) * extract.awk program: Extract Program. (line 77) * extraction, of marked strings (internationalization): String Extraction. (line 6) @@ -22855,14 +23124,14 @@ Index * Fenlason, Jay <1>: Contributors. (line 19) * Fenlason, Jay: History. (line 30) * fflush function: I/O Functions. (line 25) -* fflush function, unsupported: Options. (line 203) +* fflush function, unsupported: Options. (line 210) * field numbers: Nonconstant Fields. (line 6) * field operator $: Fields. (line 19) * field operators, dollar sign as: Fields. (line 19) -* field separators <1>: User-modified. (line 43) +* field separators <1>: User-modified. (line 45) * field separators: Field Separators. (line 13) * field separators, choice of: Field Separators. (line 49) -* field separators, FIELDWIDTHS variable and: User-modified. (line 33) +* field separators, FIELDWIDTHS variable and: User-modified. (line 35) * field separators, in multiline records: Multiple Line. (line 41) * field separators, on command line: Command Line Field Separator. (line 6) @@ -22887,7 +23156,7 @@ Index * fields, separating: Field Separators. (line 13) * fields, single-character: Single Character Fields. (line 6) -* FIELDWIDTHS variable <1>: User-modified. (line 33) +* FIELDWIDTHS variable <1>: User-modified. (line 35) * FIELDWIDTHS variable: Constant Size. (line 22) * file descriptors: Special FD. (line 6) * file names, distinguishing: Auto-set. (line 52) @@ -22910,7 +23179,7 @@ Index * files, as single records: Records. (line 191) * files, awk programs in: Long. (line 6) * files, awkprof.out: Profiling. (line 10) -* files, awkvars.out: Options. (line 95) +* files, awkvars.out: Options. (line 102) * files, closing: I/O Functions. (line 10) * files, descriptors, See file descriptors: Special FD. (line 6) * files, for process information: Special Process. (line 6) @@ -22938,7 +23207,7 @@ Index * files, portable object: Explaining gettext. (line 36) * files, portable object, converting to message object files: I18N Example. (line 62) -* files, portable object, generating: Options. (line 130) +* files, portable object, generating: Options. (line 137) * files, portal: Portal Files. (line 6) * files, processing, ARGIND variable and: Auto-set. (line 47) * files, reading: Rewind Function. (line 6) @@ -22948,7 +23217,6 @@ Index * files, source, search path for: Igawk Program. (line 358) * files, splitting: Split Program. (line 6) * files, Texinfo, extracting programs from: Extract Program. (line 6) -* Fish, Fred <1>: Bugs. (line 57) * Fish, Fred: Contributors. (line 50) * fixed-width data: Constant Size. (line 9) * flag variables <1>: Tee Program. (line 20) @@ -22985,17 +23253,19 @@ Index * Free Software Foundation (FSF): Manual History. (line 6) * free_temp internal macro: Internals. (line 102) * FreeBSD: Glossary. (line 582) -* FS variable <1>: User-modified. (line 43) +* FS variable <1>: User-modified. (line 45) * FS variable: Field Separators. (line 13) * FS variable, --field-separator option and: Options. (line 21) * FS variable, as null string: Single Character Fields. (line 20) -* FS variable, as TAB character: Options. (line 196) +* FS variable, as TAB character: Options. (line 203) * FS variable, changing value of <1>: Known Bugs. (line 6) * FS variable, changing value of: Field Separators. (line 33) * FS variable, running awk programs and: Cut Program. (line 66) * FS variable, setting from command line: Command Line Field Separator. (line 6) +* FS, containing ^: Regexp Field Splitting. + (line 59) * FSF (Free Software Foundation) <1>: Glossary. (line 284) * FSF (Free Software Foundation) <2>: Getting. (line 10) * FSF (Free Software Foundation): Manual History. (line 6) @@ -23031,7 +23301,7 @@ Index (line 6) * functions, names of <1>: Definition Syntax. (line 20) * functions, names of: Arrays. (line 17) -* functions, recursive: Definition Syntax. (line 68) +* functions, recursive: Definition Syntax. (line 72) * functions, return values, setting: Internals. (line 146) * functions, string-translation: I18N Functions. (line 6) * functions, undefined: Function Caveats. (line 79) @@ -23065,18 +23335,18 @@ Index * gawk, distribution: Distribution contents. (line 6) * gawk, escape sequences: Escape Sequences. (line 125) -* gawk, extensions, disabling: Options. (line 176) +* gawk, extensions, disabling: Options. (line 183) * gawk, features, adding: Adding Code. (line 6) * gawk, features, advanced: Advanced Features. (line 6) * gawk, fflush function in: I/O Functions. (line 45) -* gawk, field separators and: User-modified. (line 63) -* gawk, FIELDWIDTHS variable in: User-modified. (line 39) +* gawk, field separators and: User-modified. (line 65) +* gawk, FIELDWIDTHS variable in: User-modified. (line 41) * gawk, file names in: Special Files. (line 6) -* gawk, format-control characters: Control Letters. (line 80) +* gawk, format-control characters: Control Letters. (line 18) * gawk, function arguments and: Calling Built-in. (line 16) * gawk, functions, adding: Dynamic Extensions. (line 10) * gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42) -* gawk, IGNORECASE variable in: User-modified. (line 79) +* gawk, IGNORECASE variable in: User-modified. (line 81) * gawk, implementation issues: Notes. (line 6) * gawk, implementation issues, debugging: Compatibility Mode. (line 6) * gawk, implementation issues, downward compatibility: Compatibility Mode. @@ -23092,7 +23362,7 @@ Index (line 6) * gawk, interval expressions and: Regexp Operators. (line 138) * gawk, line continuation in: Conditional Exp. (line 34) -* gawk, LINT variable in: User-modified. (line 92) +* gawk, LINT variable in: User-modified. (line 94) * gawk, list of contributors to: Contributors. (line 6) * gawk, MS-DOS version of: PC Using. (line 11) * gawk, newlines in: Statements/Lines. (line 12) @@ -23114,12 +23384,12 @@ Index * gawk, string-translation functions: I18N Functions. (line 6) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 35) -* gawk, versions of, information about, printing: Options. (line 244) +* gawk, versions of, information about, printing: Options. (line 251) * gawk, word-boundary operator: GNU Regexp Operators. (line 55) * General Public License (GPL): Glossary. (line 293) * General Public License, See GPL: Manual History. (line 11) -* gensub function (gawk) <1>: String Functions. (line 361) +* gensub function (gawk) <1>: String Functions. (line 375) * gensub function (gawk): Using Constant Regexps. (line 44) * gensub function (gawk), escape processing: Gory Details. (line 6) @@ -23172,7 +23442,7 @@ Index * GNU Lesser General Public License: Glossary. (line 373) * GNU long options <1>: Options. (line 6) * GNU long options: Command Line. (line 13) -* GNU long options, printing list of: Options. (line 139) +* GNU long options, printing list of: Options. (line 146) * GNU Project <1>: Glossary. (line 302) * GNU Project: Manual History. (line 11) * GNU/Linux <1>: Glossary. (line 582) @@ -23181,27 +23451,24 @@ Index * GNU/Linux: Manual History. (line 28) * GPL (General Public License) <1>: Glossary. (line 293) * GPL (General Public License): Manual History. (line 11) -* GPL (General Public License), printing: Options. (line 87) +* GPL (General Public License), printing: Options. (line 94) * grcat program: Group Functions. (line 15) -* Grigera, Juan <1>: Bugs. (line 59) * Grigera, Juan: Contributors. (line 54) * group database, reading: Group Functions. (line 6) * group file: Group Functions. (line 6) * groups, information about: Group Functions. (line 6) -* gsub function <1>: String Functions. (line 345) +* gsub function <1>: String Functions. (line 359) * gsub function: Using Constant Regexps. (line 44) -* gsub function, arguments of: String Functions. (line 325) +* gsub function, arguments of: String Functions. (line 339) * gsub function, escape processing: Gory Details. (line 6) -* Hankerson, Darrel <1>: Bugs. (line 58) -* Hankerson, Darrel <2>: Contributors. (line 56) +* Hankerson, Darrel <1>: Contributors. (line 56) * Hankerson, Darrel: Acknowledgments. (line 53) * Hartholz, Elaine: Acknowledgments. (line 35) * Hartholz, Marshall: Acknowledgments. (line 35) -* Hasegawa, Isamu <1>: Contributors. (line 83) -* Hasegawa, Isamu: Acknowledgments. (line 53) +* Hasegawa, Isamu: Contributors. (line 83) * hexadecimal numbers: Nondecimal-numbers. (line 6) -* hexadecimal values, enabling interpretation of: Options. (line 168) +* hexadecimal values, enabling interpretation of: Options. (line 175) * histsort.awk program: History Sorting. (line 25) * Hughes, Phil: Acknowledgments. (line 40) * HUP signal: Profiling. (line 207) @@ -23218,7 +23485,7 @@ Index * if statement: Regexp Usage. (line 19) * if statement, actions, changing: Ranges. (line 25) * igawk.sh program: Igawk Program. (line 118) -* IGNORECASE variable <1>: User-modified. (line 68) +* IGNORECASE variable <1>: User-modified. (line 70) * IGNORECASE variable: Case-sensitivity. (line 26) * IGNORECASE variable, array sorting and: Array Sorting. (line 86) * IGNORECASE variable, array subscripts and: Array Intro. (line 87) @@ -23272,12 +23539,12 @@ Index * INT signal (MS-DOS): Profiling. (line 210) * integers: Basic Data Typing. (line 21) * integers, unsigned: Basic Data Typing. (line 28) -* interacting with other programs: I/O Functions. (line 63) +* interacting with other programs: I/O Functions. (line 64) * internationalization <1>: I18N and L10N. (line 6) * internationalization: I18N Functions. (line 6) * internationalization, localization <1>: Internationalization. (line 13) -* internationalization, localization: User-modified. (line 138) +* internationalization, localization: User-modified. (line 140) * internationalization, localization, character classes: Character Lists. (line 92) * internationalization, localization, gawk and: Internationalization. @@ -23301,8 +23568,8 @@ Index * Jacobs, Andrew: Passwd Functions. (line 76) * Jaegermann, Michal <1>: Contributors. (line 45) * Jaegermann, Michal: Acknowledgments. (line 53) -* Java implementation of awk: Other Versions. (line 105) -* jawk: Other Versions. (line 105) +* Java implementation of awk: Other Versions. (line 110) +* jawk: Other Versions. (line 110) * Jedi knights: Undocumented. (line 6) * join user-defined function: Join Function. (line 18) * Kahrs, Ju"rgen <1>: Contributors. (line 64) @@ -23377,22 +23644,22 @@ Index * lines, duplicate, removing: History Sorting. (line 6) * lines, matching ranges of: Ranges. (line 6) * lines, skipping between markers: Ranges. (line 43) -* lint checking: User-modified. (line 83) +* lint checking: User-modified. (line 85) * lint checking, array elements: Delete. (line 34) * lint checking, array subscripts: Uninitialized Subscripts. (line 42) * lint checking, empty programs: Command Line. (line 16) -* lint checking, issuing warnings: Options. (line 144) +* lint checking, issuing warnings: Options. (line 151) * lint checking, POSIXLY_CORRECT environment variable: Options. - (line 282) + (line 289) * lint checking, undefined functions: Function Caveats. (line 96) -* LINT variable: User-modified. (line 83) +* LINT variable: User-modified. (line 85) * Linux <1>: Glossary. (line 582) * Linux <2>: Atari Compiling. (line 16) * Linux <3>: I18N Example. (line 55) * Linux: Manual History. (line 28) * locale categories: Explaining gettext. (line 78) -* locale decimal point character: Options. (line 200) +* locale decimal point character: Options. (line 207) * locale, definition of: Locales. (line 6) * localization: I18N and L10N. (line 6) * localization, See internationalization, localization: I18N and L10N. @@ -23422,8 +23689,8 @@ Index (line 6) * marked strings, extracting: String Extraction. (line 6) * Marx, Groucho: Increment Ops. (line 61) -* match function: String Functions. (line 98) -* match function, RSTART/RLENGTH variables: String Functions. (line 115) +* match function: String Functions. (line 112) +* match function, RSTART/RLENGTH variables: String Functions. (line 129) * matching, expressions, See comparison expressions: Typing and Comparison. (line 9) * matching, leftmost longest: Multiple Line. (line 26) @@ -23456,7 +23723,7 @@ Index * NetBSD: Glossary. (line 582) * networks, programming: TCP/IP Networking. (line 6) * networks, support for: Special Network. (line 6) -* newlines <1>: Options. (line 183) +* newlines <1>: Options. (line 190) * newlines <2>: Boolean Ops. (line 67) * newlines: Statements/Lines. (line 6) * newlines, as field separators: Field Separators. (line 63) @@ -23503,7 +23770,7 @@ Index (line 42) * null strings, converting numbers to strings: Conversion. (line 21) * null strings, matching: Gory Details. (line 160) -* null strings, quoting and: Quoting. (line 58) +* null strings, quoting and: Quoting. (line 62) * number sign (#), #! (executable scripts): Executable Scripts. (line 6) * number sign (#), #! (executable scripts), portability issues with: Executable Scripts. @@ -23517,7 +23784,7 @@ Index (line 6) * numbers, converting: Conversion. (line 6) * numbers, converting, to strings <1>: Bitwise Functions. (line 99) -* numbers, converting, to strings: User-modified. (line 26) +* numbers, converting, to strings: User-modified. (line 28) * numbers, floating-point: Basic Data Typing. (line 21) * numbers, floating-point, AWKNUM internal type: Internals. (line 19) * numbers, hexadecimal: Nondecimal-numbers. (line 6) @@ -23532,16 +23799,16 @@ Index * oawk utility: Names. (line 17) * obsolete features: Obsolete. (line 6) * octal numbers: Nondecimal-numbers. (line 6) -* octal values, enabling interpretation of: Options. (line 168) -* OFMT variable <1>: User-modified. (line 100) +* octal values, enabling interpretation of: Options. (line 175) +* OFMT variable <1>: User-modified. (line 102) * OFMT variable <2>: Conversion. (line 54) * OFMT variable: OFMT. (line 15) * OFMT variable, POSIX awk and: OFMT. (line 27) -* OFS variable <1>: User-modified. (line 109) +* OFS variable <1>: User-modified. (line 111) * OFS variable <2>: Output Separators. (line 6) * OFS variable: Changing Fields. (line 64) * OpenBSD: Glossary. (line 582) -* OpenSolaris: Other Versions. (line 96) +* OpenSolaris: Other Versions. (line 101) * operating systems, BSD-based <1>: Portal Files. (line 6) * operating systems, BSD-based: Manual History. (line 28) * operating systems, PC, gawk on: PC Using. (line 6) @@ -23585,13 +23852,13 @@ Index * options, deprecated: Obsolete. (line 6) * options, long <1>: Options. (line 6) * options, long: Command Line. (line 13) -* options, printing list of: Options. (line 139) +* options, printing list of: Options. (line 146) * OR bitwise operation: Bitwise Functions. (line 6) * or Boolean-logic operator: Boolean Ops. (line 6) * or function (gawk): Bitwise Functions. (line 39) * ord user-defined function: Ordinal Functions. (line 16) * order of evaluation, concatenation: Concatenation. (line 42) -* ORS variable <1>: User-modified. (line 114) +* ORS variable <1>: User-modified. (line 116) * ORS variable: Output Separators. (line 20) * output field separator, See OFS variable: Changing Fields. (line 64) * output record separator, See ORS variable: Output Separators. @@ -23623,7 +23890,7 @@ Index * patterns, ranges in: Ranges. (line 6) * patterns, regexp constants as: Expression Patterns. (line 36) * patterns, types of: Pattern Overview. (line 14) -* pawk profiling Bell Labs awk: Other Versions. (line 88) +* pawk profiling Bell Labs awk: Other Versions. (line 93) * PC operating systems, gawk on: PC Using. (line 6) * PC operating systems, gawk on, installing: PC Installation. (line 6) * percent sign (%), % operator: Precedence. (line 55) @@ -23640,6 +23907,7 @@ Index (line 6) * pipes, input: Getline/Pipe. (line 6) * pipes, output: Redirection. (line 54) +* Pitts, Dave: Bugs. (line 73) * plus sign (+): Regexp Operators. (line 101) * plus sign (+), + operator: Precedence. (line 52) * plus sign (+), ++ operator <1>: Precedence. (line 46) @@ -23662,7 +23930,7 @@ Index * portability, deleting array elements: Delete. (line 51) * portability, example programs: Library Functions. (line 31) * portability, fflush function and: I/O Functions. (line 29) -* portability, functions, defining: Definition Syntax. (line 88) +* portability, functions, defining: Definition Syntax. (line 92) * portability, gawk: New Ports. (line 6) * portability, gettext library and: Explaining gettext. (line 10) * portability, internationalization and: I18N Portability. (line 6) @@ -23673,13 +23941,13 @@ Index * portability, NF variable, decrementing: Changing Fields. (line 115) * portability, operators: Increment Ops. (line 61) * portability, operators, not in POSIX awk: Precedence. (line 100) -* portability, POSIXLY_CORRECT environment variable: Options. (line 300) -* portability, substr function: String Functions. (line 443) +* portability, POSIXLY_CORRECT environment variable: Options. (line 307) +* portability, substr function: String Functions. (line 457) * portable object files <1>: Translator i18n. (line 6) * portable object files: Explaining gettext. (line 36) * portable object files, converting to message object files: I18N Example. (line 62) -* portable object files, generating: Options. (line 130) +* portable object files, generating: Options. (line 137) * portal files: Portal Files. (line 6) * porting gawk: New Ports. (line 6) * positional specifiers, printf statement <1>: Printf Ordering. @@ -23702,13 +23970,13 @@ Index * POSIX awk, character lists and, character classes: Character Lists. (line 30) * POSIX awk, continue statement and: Continue Statement. (line 43) -* POSIX awk, CONVFMT variable and: User-modified. (line 26) +* POSIX awk, CONVFMT variable and: User-modified. (line 28) * POSIX awk, date utility and: Time Functions. (line 259) * POSIX awk, field separators and <1>: Field Splitting Summary. (line 41) * POSIX awk, field separators and: Fields. (line 6) -* POSIX awk, FS variable and: User-modified. (line 52) -* POSIX awk, function keyword in: Definition Syntax. (line 73) +* POSIX awk, FS variable and: User-modified. (line 54) +* POSIX awk, function keyword in: Definition Syntax. (line 77) * POSIX awk, functions and, gsub/sub: Gory Details. (line 53) * POSIX awk, functions and, length: String Functions. (line 80) * POSIX awk, GNU long options and: Options. (line 15) @@ -23722,11 +23990,11 @@ Index * POSIX awk, regular expressions and: Regexp Operators. (line 154) * POSIX awk, timestamps and: Time Functions. (line 6) * POSIX awk, | I/O operator and: Getline/Pipe. (line 52) -* POSIX mode: Options. (line 176) +* POSIX mode: Options. (line 183) * POSIX, awk and: Preface. (line 22) * POSIX, gawk extensions not included in: POSIX/GNU. (line 6) * POSIX, programs, implementing in awk: Clones. (line 6) -* POSIXLY_CORRECT environment variable: Options. (line 282) +* POSIXLY_CORRECT environment variable: Options. (line 289) * precedence <1>: Precedence. (line 6) * precedence: Increment Ops. (line 61) * precedence, regexp operators: Regexp Operators. (line 149) @@ -23735,7 +24003,7 @@ Index * print statement, commas, omitting: Print Examples. (line 31) * print statement, I/O operators in: Precedence. (line 72) * print statement, line continuations and: Print Examples. (line 76) -* print statement, OFMT variable and: User-modified. (line 109) +* print statement, OFMT variable and: User-modified. (line 111) * print statement, See Also redirection, of output: Redirection. (line 14) * print statement, sprintf function and: Round Function. (line 6) @@ -23756,7 +24024,7 @@ Index * printf statement, sprintf function and: Round Function. (line 6) * printf statement, syntax of: Basic Printf. (line 6) * printing: Printing. (line 6) -* printing, list of options: Options. (line 139) +* printing, list of options: Options. (line 146) * printing, mailing labels: Labels Program. (line 6) * printing, unduplicated lines of text: Uniq Program. (line 6) * printing, user information: Id Program. (line 6) @@ -23783,7 +24051,7 @@ Index * programming conventions, functions, calling: Calling Built-in. (line 10) * programming conventions, functions, writing: Definition Syntax. - (line 50) + (line 54) * programming conventions, gawk internals: Internal File Ops. (line 33) * programming conventions, nextfile statement: Nextfile Function. (line 20) @@ -23795,16 +24063,18 @@ Index * programming, basic steps: Basic High Level. (line 19) * programming, concepts: Basic Concepts. (line 6) * pwcat program: Passwd Functions. (line 23) +* QTawk: Other Versions. (line 117) * question mark (?) <1>: GNU Regexp Operators. (line 51) * question mark (?): Regexp Operators. (line 110) * question mark (?), ?: operator: Precedence. (line 93) +* QuikTrim Awk: Other Versions. (line 117) * QUIT signal (MS-DOS): Profiling. (line 210) * quoting <1>: Comments. (line 27) * quoting <2>: Long. (line 26) * quoting: Read Terminal. (line 25) * quoting, rules for: Quoting. (line 6) -* quoting, tricks for: Quoting. (line 67) +* quoting, tricks for: Quoting. (line 71) * Rakitzis, Byron: History Sorting. (line 25) * rand function: Numeric Functions. (line 40) * random numbers, Cliff: Cliff Random Function. @@ -23813,7 +24083,7 @@ Index * random numbers, seed of: Numeric Functions. (line 70) * range expressions: Character Lists. (line 6) * range patterns: Ranges. (line 6) -* Rankin, Pat <1>: Bugs. (line 64) +* Rankin, Pat <1>: Bugs. (line 72) * Rankin, Pat <2>: Contributors. (line 35) * Rankin, Pat <3>: Assignment Ops. (line 100) * Rankin, Pat: Acknowledgments. (line 53) @@ -23821,7 +24091,7 @@ Index * readable data files, checking: File Checking. (line 6) * readable.awk program: File Checking. (line 11) * recipe for a programming language: History. (line 6) -* record separators <1>: User-modified. (line 119) +* record separators <1>: User-modified. (line 121) * record separators: Records. (line 14) * record separators, changing: Records. (line 81) * record separators, regular expressions as: Records. (line 112) @@ -23833,7 +24103,7 @@ Index * records, splitting input into: Records. (line 6) * records, terminating: Records. (line 112) * records, treating files as: Records. (line 191) -* recursive functions: Definition Syntax. (line 68) +* recursive functions: Definition Syntax. (line 72) * redirection of input: Getline/File. (line 6) * redirection of output: Redirection. (line 6) * reference counting, sorting arrays: Array Sorting. (line 79) @@ -23858,7 +24128,7 @@ Index * regular expressions, as patterns <1>: Regexp Patterns. (line 6) * regular expressions, as patterns: Regexp Usage. (line 6) * regular expressions, as record separators: Records. (line 112) -* regular expressions, case sensitivity <1>: User-modified. (line 68) +* regular expressions, case sensitivity <1>: User-modified. (line 70) * regular expressions, case sensitivity: Case-sensitivity. (line 6) * regular expressions, computed: Computed Regexps. (line 6) * regular expressions, constants, See regexp constants: Regexp Usage. @@ -23868,7 +24138,7 @@ Index (line 59) * regular expressions, gawk, command-line options: GNU Regexp Operators. (line 62) -* regular expressions, interval expressions and: Options. (line 224) +* regular expressions, interval expressions and: Options. (line 231) * regular expressions, leftmost longest match: Leftmost Longest. (line 6) * regular expressions, operators <1>: Regexp Operators. (line 6) @@ -23901,7 +24171,7 @@ Index * right shift, bitwise: Bitwise Functions. (line 32) * Ritchie, Dennis: Basic Data Typing. (line 71) * RLENGTH variable: Auto-set. (line 163) -* RLENGTH variable, match function and: String Functions. (line 115) +* RLENGTH variable, match function and: String Functions. (line 129) * Robbins, Arnold <1>: Future Extensions. (line 6) * Robbins, Arnold <2>: Bugs. (line 29) * Robbins, Arnold <3>: Contributors. (line 92) @@ -23923,12 +24193,12 @@ Index * round user-defined function: Round Function. (line 16) * rounding: Round Function. (line 6) * rounding numbers: Round Function. (line 6) -* RS variable <1>: User-modified. (line 119) +* RS variable <1>: User-modified. (line 121) * RS variable: Records. (line 20) * RS variable, multiline records and: Multiple Line. (line 17) * rshift function (gawk): Bitwise Functions. (line 46) * RSTART variable: Auto-set. (line 169) -* RSTART variable, match function and: String Functions. (line 115) +* RSTART variable, match function and: String Functions. (line 129) * RT variable <1>: Auto-set. (line 176) * RT variable <2>: Multiple Line. (line 129) * RT variable: Records. (line 112) @@ -23957,19 +24227,19 @@ Index (line 10) * semicolon (;), separating statements in actions: Action Overview. (line 19) -* separators, field: User-modified. (line 43) -* separators, field, FIELDWIDTHS variable and: User-modified. (line 33) +* separators, field: User-modified. (line 45) +* separators, field, FIELDWIDTHS variable and: User-modified. (line 35) * separators, field, POSIX and: Fields. (line 6) * separators, for records: Records. (line 14) * separators, for records, regular expressions as: Records. (line 112) * separators, for statements in actions: Action Overview. (line 19) -* separators, record: User-modified. (line 119) -* separators, subscript: User-modified. (line 132) +* separators, record: User-modified. (line 121) +* separators, subscript: User-modified. (line 134) * set_value internal function: Internals. (line 146) * shells, piping commands into: Redirection. (line 140) * shells, quoting: Using Shell Variables. (line 12) -* shells, quoting, rules for: Quoting. (line 14) +* shells, quoting, rules for: Quoting. (line 18) * shells, scripts: One-shot. (line 22) * shells, variables: Using Shell Variables. (line 6) @@ -23992,38 +24262,38 @@ Index * signals, QUIT/SIGQUIT (MS-DOS): Profiling. (line 210) * signals, USR1/SIGUSR1: Profiling. (line 185) * sin function: Numeric Functions. (line 31) -* single quote (') <1>: Quoting. (line 27) +* single quote (') <1>: Quoting. (line 31) * single quote (') <2>: Long. (line 33) * single quote ('): One-shot. (line 15) * single quote ('), vs. apostrophe: Comments. (line 27) -* single quote ('), with double quotes: Quoting. (line 49) +* single quote ('), with double quotes: Quoting. (line 53) * single-character fields: Single Character Fields. (line 6) * single-precision floating-point: Basic Data Typing. (line 33) * Skywalker, Luke: Undocumented. (line 6) * sleep utility: Alarm Program. (line 102) * sockets: TCP/IP Networking. (line 30) -* Solaris, POSIX compliant awk: Other Versions. (line 96) +* Solaris, POSIX compliant awk: Other Versions. (line 101) * sort function, arrays, sorting: Array Sorting. (line 6) * sort utility: Word Sorting. (line 54) * sort utility, coprocesses and: Two-way I/O. (line 84) * sorting characters in different languages: Explaining gettext. (line 89) -* source code, awka: Other Versions. (line 76) +* source code, awka: Other Versions. (line 81) * source code, Bell Laboratories awk: Other Versions. (line 13) * source code, gawk: Gawk Distribution. (line 6) * source code, mawk: Other Versions. (line 33) -* source code, mixing: Options. (line 231) +* source code, mixing: Options. (line 238) * source files, search path for: Igawk Program. (line 358) * sparse arrays: Array Intro. (line 66) * Spencer, Henry: Glossary. (line 12) -* split function: String Functions. (line 186) +* split function: String Functions. (line 200) * split function, array elements, deleting: Delete. (line 56) * split utility: Split Program. (line 6) * split.awk program: Split Program. (line 30) -* sprintf function <1>: String Functions. (line 239) +* sprintf function <1>: String Functions. (line 253) * sprintf function: OFMT. (line 15) -* sprintf function, OFMT variable and: User-modified. (line 109) +* sprintf function, OFMT variable and: User-modified. (line 111) * sprintf function, print/printf statements and: Round Function. (line 6) * sqrt function: Numeric Functions. (line 18) @@ -24055,7 +24325,7 @@ Index * strings: Internals. (line 77) * strings, converting: Conversion. (line 6) * strings, converting, numbers to <1>: Bitwise Functions. (line 99) -* strings, converting, numbers to: User-modified. (line 26) +* strings, converting, numbers to: User-modified. (line 28) * strings, empty, See null strings: Records. (line 102) * strings, extracting: String Extraction. (line 6) * strings, for localization: Programmer i18n. (line 14) @@ -24065,16 +24335,16 @@ Index * strings, null: Regexp Field Splitting. (line 43) * strings, numeric: Variable Typing. (line 6) -* strings, splitting: String Functions. (line 200) -* strtonum function (gawk): String Functions. (line 247) +* strings, splitting: String Functions. (line 214) +* strtonum function (gawk): String Functions. (line 261) * strtonum function (gawk), --non-decimal-data option and: Nondecimal Data. (line 36) -* sub function <1>: String Functions. (line 268) +* sub function <1>: String Functions. (line 282) * sub function: Using Constant Regexps. (line 44) -* sub function, arguments of: String Functions. (line 325) +* sub function, arguments of: String Functions. (line 339) * sub function, escape processing: Gory Details. (line 6) -* subscript separators: User-modified. (line 132) +* subscript separators: User-modified. (line 134) * subscripts in arrays, multidimensional: Multi-dimensional. (line 6) * subscripts in arrays, multidimensional, scanning: Multi-scanning. (line 11) @@ -24082,15 +24352,15 @@ Index (line 6) * subscripts in arrays, uninitialized variables as: Uninitialized Subscripts. (line 6) -* SUBSEP variable: User-modified. (line 132) +* SUBSEP variable: User-modified. (line 134) * SUBSEP variable, multidimensional arrays: Multi-dimensional. (line 12) -* substr function: String Functions. (line 412) -* Sumner, Andrew: Other Versions. (line 76) +* substr function: String Functions. (line 426) +* Sumner, Andrew: Other Versions. (line 81) * switch statement: Switch Statement. (line 6) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 148) -* system function: I/O Functions. (line 63) +* system function: I/O Functions. (line 64) * systime function (gawk): Time Functions. (line 24) * tandem: Tandem Installation. (line 6) * Tcl: Library Names. (line 57) @@ -24115,7 +24385,7 @@ Index * text, printing, unduplicated lines of: Uniq Program. (line 6) * textdomain function (C library): Explaining gettext. (line 27) * TEXTDOMAIN variable <1>: Programmer i18n. (line 9) -* TEXTDOMAIN variable: User-modified. (line 138) +* TEXTDOMAIN variable: User-modified. (line 140) * TEXTDOMAIN variable, BEGIN pattern and: Programmer i18n. (line 58) * TEXTDOMAIN variable, portability and: I18N Portability. (line 20) * tilde (~), ~ operator <1>: Expression Patterns. (line 24) @@ -24137,11 +24407,11 @@ Index (line 6) * tmp_number internal function: Internals. (line 92) * tmp_string internal function: Internals. (line 87) -* tolower function: String Functions. (line 454) -* toupper function: String Functions. (line 460) +* tolower function: String Functions. (line 468) +* toupper function: String Functions. (line 474) * tr utility: Translate Program. (line 6) * translate.awk program: Translate Program. (line 55) -* troubleshooting, --non-decimal-data option: Options. (line 171) +* troubleshooting, --non-decimal-data option: Options. (line 178) * troubleshooting, -F option: Known Bugs. (line 6) * troubleshooting, == operator: Comparison Operators. (line 37) @@ -24153,7 +24423,7 @@ Index (line 22) * troubleshooting, fatal errors, printf format strings: Format Modifiers. (line 159) -* troubleshooting, fflush function: I/O Functions. (line 51) +* troubleshooting, fflush function: I/O Functions. (line 52) * troubleshooting, function call syntax: Function Calls. (line 28) * troubleshooting, gawk <1>: Compatibility Mode. (line 6) * troubleshooting, gawk: Known Bugs. (line 6) @@ -24161,8 +24431,8 @@ Index * troubleshooting, gawk, fatal errors, function arguments: Calling Built-in. (line 16) * troubleshooting, getline function: File Checking. (line 24) -* troubleshooting, gsub/sub functions: String Functions. (line 335) -* troubleshooting, match function: String Functions. (line 181) +* troubleshooting, gsub/sub functions: String Functions. (line 349) +* troubleshooting, match function: String Functions. (line 195) * troubleshooting, print statement, omitting commas: Print Examples. (line 31) * troubleshooting, printing: Redirection. (line 115) @@ -24171,10 +24441,10 @@ Index * troubleshooting, regexp constants vs. string constants: Computed Regexps. (line 38) * troubleshooting, string concatenation: Concatenation. (line 27) -* troubleshooting, substr function: String Functions. (line 430) -* troubleshooting, system function: I/O Functions. (line 87) +* troubleshooting, substr function: String Functions. (line 444) +* troubleshooting, system function: I/O Functions. (line 88) * troubleshooting, typographical errors, global variables: Options. - (line 101) + (line 108) * true, logical: Truth Values. (line 6) * Trueman, David <1>: Contributors. (line 31) * Trueman, David <2>: Acknowledgments. (line 44) @@ -24232,12 +24502,12 @@ Index (line 6) * variables, getline command into, using: Getline/Variable. (line 6) * variables, global, for library functions: Library Names. (line 11) -* variables, global, printing list of: Options. (line 95) +* variables, global, printing list of: Options. (line 102) * variables, initializing: Using Variables. (line 17) * variables, names of: Arrays. (line 17) * variables, private: Library Names. (line 11) * variables, setting: Options. (line 30) -* variables, shadowing: Definition Syntax. (line 56) +* variables, shadowing: Definition Syntax. (line 60) * variables, types of: Assignment Ops. (line 40) * variables, types of, comparison expressions and: Typing and Comparison. (line 9) @@ -24257,7 +24527,7 @@ Index * vname internal variable: Internals. (line 62) * w utility: Constant Size. (line 22) * Wall, Larry: Future Extensions. (line 6) -* warnings, issuing: Options. (line 144) +* warnings, issuing: Options. (line 151) * wc utility: Wc Program. (line 6) * wc.awk program: Wc Program. (line 45) * Weinberger, Peter <1>: Contributors. (line 12) @@ -24266,7 +24536,8 @@ Index * while statement: Regexp Usage. (line 19) * whitespace, as field separators: Field Separators. (line 63) * whitespace, functions, calling: Calling Built-in. (line 10) -* whitespace, newlines as: Options. (line 183) +* whitespace, newlines as: Options. (line 190) +* Wildenhues, Ralf: Bugs. (line 71) * Williams, Kent: Contributors. (line 37) * Woods, John: Contributors. (line 28) * word boundaries, matching: GNU Regexp Operators. @@ -24315,370 +24586,373 @@ Index Tag Table: -Node: Top1336 -Node: Foreword27371 -Node: Preface31692 -Ref: Preface-Footnote-134571 -Node: History34803 -Node: Names37019 -Ref: Names-Footnote-138491 -Node: This Manual38563 -Ref: This Manual-Footnote-143318 -Node: Conventions43418 -Node: Manual History45292 -Ref: Manual History-Footnote-148745 -Ref: Manual History-Footnote-248786 -Node: How To Contribute48860 -Node: Acknowledgments49458 -Node: Getting Started53260 -Node: Running gawk55632 -Node: One-shot56818 -Node: Read Terminal58043 -Ref: Read Terminal-Footnote-159701 -Node: Long59872 -Node: Executable Scripts61248 -Ref: Executable Scripts-Footnote-163144 -Ref: Executable Scripts-Footnote-263295 -Node: Comments63746 -Node: Quoting66114 -Node: Sample Data Files70615 -Node: Very Simple73647 -Node: Two Rules78252 -Node: More Complex80399 -Ref: More Complex-Footnote-183322 -Ref: More Complex-Footnote-283770 -Node: Statements/Lines83853 -Ref: Statements/Lines-Footnote-188235 -Node: Other Features88500 -Node: When89352 -Ref: When-Footnote-191591 -Node: Regexp91676 -Node: Regexp Usage93130 -Node: Escape Sequences95182 -Node: Regexp Operators100921 -Ref: Regexp Operators-Footnote-1108028 -Ref: Regexp Operators-Footnote-2108175 -Node: Character Lists108273 -Ref: table-char-classes110230 -Node: GNU Regexp Operators112855 -Node: Case-sensitivity116499 -Ref: Case-sensitivity-Footnote-1119672 -Node: Leftmost Longest119907 -Node: Computed Regexps121098 -Node: Locales124479 -Node: Reading Files126745 -Node: Records128502 -Ref: Records-Footnote-1137060 -Node: Fields137097 -Ref: Fields-Footnote-1140127 -Node: Nonconstant Fields140213 -Node: Changing Fields142415 -Node: Field Separators147696 -Node: Regexp Field Splitting151187 -Node: Single Character Fields153652 -Node: Command Line Field Separator154703 -Node: Field Splitting Summary158142 -Ref: Field Splitting Summary-Footnote-1161328 -Node: Constant Size161429 -Node: Multiple Line165906 -Ref: Multiple Line-Footnote-1171637 -Node: Getline171816 -Node: Plain Getline173884 -Node: Getline/Variable175901 -Node: Getline/File177042 -Node: Getline/Variable/File178366 -Node: Getline/Pipe179925 -Node: Getline/Variable/Pipe182522 -Node: Getline/Coprocess183629 -Node: Getline/Variable/Coprocess184872 -Node: Getline Notes185586 -Node: Getline Summary187229 -Ref: table-getline-variants187513 -Node: Printing188079 -Node: Print189708 -Node: Print Examples191034 -Node: Output Separators193829 -Node: OFMT195590 -Node: Printf196945 -Node: Basic Printf197864 -Node: Control Letters199399 -Node: Format Modifiers202617 -Node: Printf Examples208635 -Node: Redirection211352 -Node: Special Files218249 -Node: Special FD218883 -Node: Special Process221909 -Node: Special Network224144 -Node: Special Caveats224986 -Ref: Special Caveats-Footnote-1226184 -Node: Close Files And Pipes226567 -Ref: Close Files And Pipes-Footnote-1233488 -Ref: Close Files And Pipes-Footnote-2233636 -Node: Expressions233784 -Node: Constants235973 -Node: Scalar Constants236654 -Ref: Scalar Constants-Footnote-1237509 -Node: Nondecimal-numbers237691 -Node: Regexp Constants240749 -Node: Using Constant Regexps241222 -Node: Variables244305 -Node: Using Variables244961 -Node: Assignment Options246471 -Node: Conversion248348 -Ref: table-locale-affects253780 -Ref: Conversion-Footnote-1254404 -Node: Arithmetic Ops254513 -Node: Concatenation257025 -Ref: Concatenation-Footnote-1259807 -Node: Assignment Ops259898 -Ref: table-assign-ops264876 -Node: Increment Ops266277 -Node: Truth Values269770 -Node: Typing and Comparison270820 -Node: Variable Typing271523 -Ref: Variable Typing-Footnote-1275198 -Node: Comparison Operators275342 -Ref: table-relational-ops275718 -Node: Boolean Ops279267 -Ref: Boolean Ops-Footnote-1283327 -Node: Conditional Exp283418 -Node: Function Calls285155 -Node: Precedence288437 -Node: Patterns and Actions292093 -Node: Pattern Overview293147 -Node: Regexp Patterns294584 -Node: Expression Patterns295127 -Node: Ranges298677 -Node: BEGIN/END301766 -Node: Using BEGIN/END302516 -Ref: Using BEGIN/END-Footnote-1305248 -Node: I/O And BEGIN/END305362 -Node: Empty307629 -Node: Using Shell Variables307937 -Node: Action Overview310218 -Node: Statements312576 -Node: If Statement314432 -Node: While Statement315931 -Node: Do Statement317963 -Node: For Statement319112 -Node: Switch Statement322252 -Node: Break Statement324528 -Node: Continue Statement326585 -Node: Next Statement328489 -Node: Nextfile Statement330769 -Node: Exit Statement333366 -Node: Built-in Variables335437 -Node: User-modified336532 -Ref: User-modified-Footnote-1343775 -Node: Auto-set343837 -Ref: Auto-set-Footnote-1352177 -Node: ARGC and ARGV352382 -Node: Arrays356094 -Node: Array Intro358002 -Node: Reference to Elements362199 -Node: Assigning Elements364066 -Node: Array Example364533 -Node: Scanning an Array366255 -Node: Delete368522 -Ref: Delete-Footnote-1370904 -Node: Numeric Array Subscripts370961 -Node: Uninitialized Subscripts373148 -Node: Multi-dimensional374754 -Node: Multi-scanning377767 -Node: Array Sorting379382 -Node: Functions383045 -Node: Built-in383780 -Node: Calling Built-in384750 -Node: Numeric Functions386717 -Ref: Numeric Functions-Footnote-1390459 -Ref: Numeric Functions-Footnote-2390785 -Node: String Functions391054 -Ref: String Functions-Footnote-1410916 -Ref: String Functions-Footnote-2411045 -Ref: String Functions-Footnote-3411293 -Node: Gory Details411380 -Ref: table-sub-escapes413015 -Ref: table-sub-posix-92414350 -Ref: table-sub-proposed415689 -Ref: table-posix-2001-sub417041 -Ref: table-gensub-escapes418378 -Ref: Gory Details-Footnote-1419564 -Node: I/O Functions419615 -Ref: I/O Functions-Footnote-1426189 -Node: Time Functions426280 -Ref: Time Functions-Footnote-1437072 -Ref: Time Functions-Footnote-2437140 -Ref: Time Functions-Footnote-3437298 -Ref: Time Functions-Footnote-4437409 -Ref: Time Functions-Footnote-5437534 -Ref: Time Functions-Footnote-6437761 -Node: Bitwise Functions438023 -Ref: table-bitwise-ops438601 -Ref: Bitwise Functions-Footnote-1442835 -Node: I18N Functions443019 -Node: User-defined444740 -Node: Definition Syntax445521 -Node: Function Example449880 -Node: Function Caveats452460 -Node: Return Statement456385 -Node: Dynamic Typing459042 -Node: Internationalization459779 -Node: I18N and L10N461198 -Node: Explaining gettext461882 -Ref: Explaining gettext-Footnote-1466789 -Ref: Explaining gettext-Footnote-2467028 -Node: Programmer i18n467197 -Node: Translator i18n471420 -Node: String Extraction472210 -Ref: String Extraction-Footnote-1473160 -Node: Printf Ordering473286 -Ref: Printf Ordering-Footnote-1476064 -Node: I18N Portability476128 -Ref: I18N Portability-Footnote-1478556 -Node: I18N Example478619 -Ref: I18N Example-Footnote-1481231 -Node: Gawk I18N481303 -Node: Advanced Features481885 -Node: Nondecimal Data483284 -Node: Two-way I/O484843 -Ref: Two-way I/O-Footnote-1490324 -Node: TCP/IP Networking490401 -Node: Portal Files492830 -Node: Profiling493474 -Node: Invoking Gawk500930 -Node: Command Line502110 -Node: Options502895 -Ref: Options-Footnote-1515735 -Node: Other Arguments515760 -Node: AWKPATH Variable518441 -Ref: AWKPATH Variable-Footnote-1521213 -Node: Obsolete521473 -Node: Undocumented522473 -Node: Known Bugs522735 -Node: Library Functions523337 -Ref: Library Functions-Footnote-1526318 -Node: Library Names526489 -Ref: Library Names-Footnote-1529962 -Ref: Library Names-Footnote-2530181 -Node: General Functions530267 -Node: Nextfile Function531326 -Node: Strtonum Function535690 -Node: Assert Function538625 -Node: Round Function541929 -Node: Cliff Random Function543436 -Ref: Cliff Random Function-Footnote-1544425 -Node: Ordinal Functions544496 -Ref: Ordinal Functions-Footnote-1547556 -Node: Join Function547772 -Ref: Join Function-Footnote-1549532 -Node: Gettimeofday Function549732 -Node: Data File Management553435 -Node: Filetrans Function554067 -Node: Rewind Function557493 -Node: File Checking558939 -Node: Empty Files559991 -Node: Ignoring Assigns562216 -Node: Getopt Function563764 -Ref: Getopt Function-Footnote-1575042 -Node: Passwd Functions575243 -Ref: Passwd Functions-Footnote-1583904 -Node: Group Functions583992 -Node: Sample Programs591990 -Node: Running Examples592667 -Node: Clones593395 -Node: Cut Program594527 -Node: Egrep Program604284 -Ref: Egrep Program-Footnote-1612034 -Node: Id Program612144 -Node: Split Program615751 -Node: Tee Program619215 -Node: Uniq Program621892 -Node: Wc Program629260 -Ref: Wc Program-Footnote-1633504 -Node: Miscellaneous Programs633700 -Node: Dupword Program634696 -Node: Alarm Program636727 -Node: Translate Program641267 -Ref: Translate Program-Footnote-1645513 -Ref: Translate Program-Footnote-2645750 -Node: Labels Program645884 -Ref: Labels Program-Footnote-1649175 -Node: Word Sorting649259 -Node: History Sorting653542 -Node: Extract Program655380 -Node: Simple Sed662732 -Node: Igawk Program665787 -Ref: Igawk Program-Footnote-1680492 -Ref: Igawk Program-Footnote-2680693 -Node: Language History680831 -Node: V7/SVR3.1682215 -Node: SVR4684479 -Node: POSIX685918 -Node: BTL687526 -Node: POSIX/GNU689051 -Node: Contributors696885 -Node: Installation700421 -Node: Gawk Distribution701392 -Node: Getting701876 -Node: Extracting703110 -Node: Distribution contents704498 -Node: Unix Installation709579 -Node: Quick Installation710170 -Node: Additional Configuration Options711872 -Node: Configuration Philosophy713734 -Node: Non-Unix Installation716098 -Node: Amiga Installation716685 -Node: BeOS Installation717781 -Node: PC Installation718934 -Node: PC Binary Installation720164 -Node: PC Compiling722007 -Node: PC Dynamic726559 -Node: PC Using728920 -Node: Cygwin733533 -Ref: Cygwin-Footnote-1734531 -Node: VMS Installation734563 -Node: VMS Compilation735167 -Node: VMS Installation Details736744 -Node: VMS Running738374 -Node: VMS POSIX739971 -Node: VMS Old Gawk741269 -Node: Unsupported741738 -Node: Atari Installation742141 -Node: Atari Compiling743430 -Node: Atari Using745315 -Node: Tandem Installation748160 -Node: Bugs749840 -Node: Other Versions753145 -Ref: Other Versions-Footnote-1757571 -Ref: Other Versions-Footnote-2757613 -Ref: Other Versions-Footnote-3757650 -Node: Notes757688 -Node: Compatibility Mode758380 -Node: Additions759174 -Node: Adding Code759924 -Node: New Ports765974 -Node: Dynamic Extensions770106 -Node: Internals771363 -Node: Sample Library782366 -Node: Internal File Description783025 -Node: Internal File Ops786718 -Ref: Internal File Ops-Footnote-1792044 -Node: Using Internal File Ops792192 -Node: Future Extensions794215 -Node: Basic Concepts798168 -Node: Basic High Level798925 -Ref: Basic High Level-Footnote-1802957 -Node: Basic Data Typing803151 -Node: Floating Point Issues807588 -Ref: Floating Point Issues-Footnote-1808674 -Node: String Conversion Precision808727 -Ref: String Conversion Precision-Footnote-1810421 -Node: Unexpected Results810530 -Node: POSIX Floating Point Problems812356 -Ref: POSIX Floating Point Problems-Footnote-1815830 -Node: Glossary815868 -Node: Copying839636 -Node: GNU Free Documentation License877193 -Node: Index899595 +Node: Top1334 +Node: Foreword27620 +Node: Preface31941 +Ref: Preface-Footnote-134820 +Node: History35052 +Node: Names37268 +Ref: Names-Footnote-138740 +Node: This Manual38812 +Ref: This Manual-Footnote-143567 +Node: Conventions43667 +Node: Manual History45541 +Ref: Manual History-Footnote-148994 +Ref: Manual History-Footnote-249035 +Node: How To Contribute49109 +Node: Acknowledgments50251 +Node: Getting Started54037 +Node: Running gawk56409 +Node: One-shot57595 +Node: Read Terminal58820 +Ref: Read Terminal-Footnote-160478 +Node: Long60649 +Node: Executable Scripts62025 +Ref: Executable Scripts-Footnote-163921 +Ref: Executable Scripts-Footnote-264072 +Node: Comments64523 +Node: Quoting66891 +Node: DOS Quoting71471 +Node: Sample Data Files72143 +Node: Very Simple75175 +Node: Two Rules79780 +Node: More Complex81927 +Ref: More Complex-Footnote-184850 +Ref: More Complex-Footnote-285298 +Node: Statements/Lines85381 +Ref: Statements/Lines-Footnote-189763 +Node: Other Features90028 +Node: When90880 +Ref: When-Footnote-193119 +Node: Regexp93204 +Node: Regexp Usage94658 +Node: Escape Sequences96710 +Node: Regexp Operators102449 +Ref: Regexp Operators-Footnote-1109556 +Ref: Regexp Operators-Footnote-2109703 +Node: Character Lists109801 +Ref: table-char-classes111758 +Node: GNU Regexp Operators114383 +Node: Case-sensitivity118027 +Ref: Case-sensitivity-Footnote-1121200 +Node: Leftmost Longest121435 +Node: Computed Regexps122626 +Node: Locales126007 +Node: Reading Files128273 +Node: Records130030 +Ref: Records-Footnote-1138588 +Node: Fields138625 +Ref: Fields-Footnote-1141655 +Node: Nonconstant Fields141741 +Node: Changing Fields143943 +Node: Field Separators149224 +Node: Regexp Field Splitting152715 +Node: Single Character Fields156268 +Node: Command Line Field Separator157319 +Node: Field Splitting Summary160758 +Ref: Field Splitting Summary-Footnote-1163944 +Node: Constant Size164045 +Node: Multiple Line168522 +Ref: Multiple Line-Footnote-1174253 +Node: Getline174432 +Node: Plain Getline176500 +Node: Getline/Variable178587 +Node: Getline/File179728 +Node: Getline/Variable/File181052 +Node: Getline/Pipe182611 +Node: Getline/Variable/Pipe185208 +Node: Getline/Coprocess186315 +Node: Getline/Variable/Coprocess187558 +Node: Getline Notes188272 +Node: Getline Summary189915 +Ref: table-getline-variants190199 +Node: Printing190765 +Node: Print192394 +Node: Print Examples193720 +Node: Output Separators196515 +Node: OFMT198276 +Node: Printf199631 +Node: Basic Printf200550 +Node: Control Letters202085 +Node: Format Modifiers205968 +Node: Printf Examples211986 +Node: Redirection214703 +Node: Special Files221600 +Node: Special FD222234 +Node: Special Process225260 +Node: Special Network227495 +Node: Special Caveats228337 +Ref: Special Caveats-Footnote-1229535 +Node: Close Files And Pipes229918 +Ref: Close Files And Pipes-Footnote-1236839 +Ref: Close Files And Pipes-Footnote-2236987 +Node: Expressions237135 +Node: Constants239324 +Node: Scalar Constants240005 +Ref: Scalar Constants-Footnote-1240860 +Node: Nondecimal-numbers241042 +Node: Regexp Constants244100 +Node: Using Constant Regexps244573 +Node: Variables247656 +Node: Using Variables248312 +Node: Assignment Options249822 +Node: Conversion251699 +Ref: table-locale-affects257130 +Ref: Conversion-Footnote-1257754 +Node: Arithmetic Ops257863 +Node: Concatenation260375 +Ref: Concatenation-Footnote-1263157 +Node: Assignment Ops263248 +Ref: table-assign-ops268226 +Node: Increment Ops269627 +Node: Truth Values273120 +Node: Typing and Comparison274170 +Node: Variable Typing274873 +Ref: Variable Typing-Footnote-1278559 +Node: Comparison Operators278703 +Ref: table-relational-ops279079 +Node: Boolean Ops282628 +Ref: Boolean Ops-Footnote-1286688 +Node: Conditional Exp286779 +Node: Function Calls288516 +Node: Precedence291798 +Node: Patterns and Actions295454 +Node: Pattern Overview296508 +Node: Regexp Patterns297945 +Node: Expression Patterns298488 +Node: Ranges302038 +Node: BEGIN/END305127 +Node: Using BEGIN/END305877 +Ref: Using BEGIN/END-Footnote-1308609 +Node: I/O And BEGIN/END308723 +Node: Empty310990 +Node: Using Shell Variables311298 +Node: Action Overview313579 +Node: Statements315937 +Node: If Statement317793 +Node: While Statement319292 +Node: Do Statement321324 +Node: For Statement322473 +Node: Switch Statement325613 +Node: Break Statement327889 +Node: Continue Statement329946 +Node: Next Statement331850 +Node: Nextfile Statement334130 +Node: Exit Statement336727 +Node: Built-in Variables338998 +Node: User-modified340093 +Ref: User-modified-Footnote-1347458 +Node: Auto-set347520 +Ref: Auto-set-Footnote-1355860 +Node: ARGC and ARGV356065 +Node: Arrays359777 +Node: Array Intro361685 +Node: Reference to Elements365882 +Node: Assigning Elements367749 +Node: Array Example368216 +Node: Scanning an Array369938 +Node: Delete372205 +Ref: Delete-Footnote-1374587 +Node: Numeric Array Subscripts374644 +Node: Uninitialized Subscripts376831 +Node: Multi-dimensional378437 +Node: Multi-scanning381450 +Node: Array Sorting383065 +Node: Functions386728 +Node: Built-in387463 +Node: Calling Built-in388433 +Node: Numeric Functions390400 +Ref: Numeric Functions-Footnote-1394142 +Ref: Numeric Functions-Footnote-2394468 +Node: String Functions394737 +Ref: String Functions-Footnote-1415118 +Ref: String Functions-Footnote-2415247 +Ref: String Functions-Footnote-3415495 +Node: Gory Details415582 +Ref: table-sub-escapes417217 +Ref: table-sub-posix-92418552 +Ref: table-sub-proposed419891 +Ref: table-posix-2001-sub421243 +Ref: table-gensub-escapes422580 +Ref: Gory Details-Footnote-1423766 +Node: I/O Functions423817 +Ref: I/O Functions-Footnote-1430468 +Node: Time Functions430559 +Ref: Time Functions-Footnote-1441351 +Ref: Time Functions-Footnote-2441419 +Ref: Time Functions-Footnote-3441577 +Ref: Time Functions-Footnote-4441688 +Ref: Time Functions-Footnote-5441813 +Ref: Time Functions-Footnote-6442040 +Node: Bitwise Functions442302 +Ref: table-bitwise-ops442880 +Ref: Bitwise Functions-Footnote-1447114 +Node: I18N Functions447298 +Node: User-defined449019 +Node: Definition Syntax449800 +Node: Function Example454376 +Node: Function Caveats456956 +Node: Return Statement460881 +Node: Dynamic Typing463538 +Node: Internationalization464275 +Node: I18N and L10N465694 +Node: Explaining gettext466378 +Ref: Explaining gettext-Footnote-1471285 +Ref: Explaining gettext-Footnote-2471524 +Node: Programmer i18n471693 +Node: Translator i18n475916 +Node: String Extraction476706 +Ref: String Extraction-Footnote-1477656 +Node: Printf Ordering477782 +Ref: Printf Ordering-Footnote-1480560 +Node: I18N Portability480624 +Ref: I18N Portability-Footnote-1483052 +Node: I18N Example483115 +Ref: I18N Example-Footnote-1485727 +Node: Gawk I18N485799 +Node: Advanced Features486381 +Node: Nondecimal Data487780 +Node: Two-way I/O489339 +Ref: Two-way I/O-Footnote-1494820 +Node: TCP/IP Networking494897 +Node: Portal Files497326 +Node: Profiling497970 +Node: Invoking Gawk505426 +Node: Command Line506660 +Node: Options507445 +Ref: Options-Footnote-1520522 +Node: Other Arguments520547 +Node: AWKPATH Variable523228 +Ref: AWKPATH Variable-Footnote-1526000 +Node: Exit Status526260 +Node: Obsolete526922 +Node: Undocumented527921 +Node: Known Bugs528186 +Node: Library Functions528788 +Ref: Library Functions-Footnote-1531769 +Node: Library Names531940 +Ref: Library Names-Footnote-1535413 +Ref: Library Names-Footnote-2535632 +Node: General Functions535718 +Node: Nextfile Function536777 +Node: Strtonum Function541141 +Node: Assert Function544076 +Node: Round Function547380 +Node: Cliff Random Function548913 +Ref: Cliff Random Function-Footnote-1549902 +Node: Ordinal Functions549973 +Ref: Ordinal Functions-Footnote-1553033 +Node: Join Function553249 +Ref: Join Function-Footnote-1555009 +Node: Gettimeofday Function555209 +Node: Data File Management558912 +Node: Filetrans Function559544 +Node: Rewind Function562970 +Node: File Checking564416 +Node: Empty Files565446 +Node: Ignoring Assigns567671 +Node: Getopt Function569219 +Ref: Getopt Function-Footnote-1580497 +Node: Passwd Functions580698 +Ref: Passwd Functions-Footnote-1589359 +Node: Group Functions589447 +Node: Sample Programs597445 +Node: Running Examples598122 +Node: Clones598850 +Node: Cut Program599982 +Node: Egrep Program609739 +Ref: Egrep Program-Footnote-1617489 +Node: Id Program617599 +Node: Split Program621206 +Node: Tee Program624670 +Node: Uniq Program627347 +Node: Wc Program634715 +Ref: Wc Program-Footnote-1638959 +Node: Miscellaneous Programs639155 +Node: Dupword Program640275 +Node: Alarm Program642306 +Node: Translate Program646846 +Ref: Translate Program-Footnote-1651214 +Ref: Translate Program-Footnote-2651451 +Node: Labels Program651585 +Ref: Labels Program-Footnote-1654876 +Node: Word Sorting654960 +Node: History Sorting659243 +Node: Extract Program661081 +Node: Simple Sed668433 +Node: Igawk Program671488 +Ref: Igawk Program-Footnote-1686219 +Ref: Igawk Program-Footnote-2686420 +Node: Signature Program686558 +Node: Language History687638 +Node: V7/SVR3.1689022 +Node: SVR4691286 +Node: POSIX692725 +Node: BTL694333 +Node: POSIX/GNU695858 +Node: Contributors704025 +Node: Installation707561 +Node: Gawk Distribution708532 +Node: Getting709016 +Node: Extracting710250 +Node: Distribution contents711638 +Node: Unix Installation716719 +Node: Quick Installation717310 +Node: Additional Configuration Options719012 +Node: Configuration Philosophy721172 +Node: Non-Unix Installation723536 +Node: Amiga Installation724123 +Node: BeOS Installation725219 +Node: PC Installation726372 +Node: PC Binary Installation727602 +Node: PC Compiling729445 +Node: PC Dynamic733941 +Node: PC Using736302 +Node: Cygwin740852 +Ref: Cygwin-Footnote-1741850 +Node: VMS Installation741882 +Node: VMS Compilation742486 +Node: VMS Installation Details744063 +Node: VMS Running745693 +Node: VMS POSIX747290 +Node: VMS Old Gawk748588 +Node: Unsupported749057 +Node: Atari Installation749460 +Node: Atari Compiling750749 +Node: Atari Using752634 +Node: Tandem Installation755479 +Node: Bugs757159 +Node: Other Versions761065 +Ref: Other Versions-Footnote-1766114 +Ref: Other Versions-Footnote-2766157 +Ref: Other Versions-Footnote-3766194 +Node: Notes766232 +Node: Compatibility Mode766924 +Node: Additions767718 +Node: Adding Code768468 +Node: New Ports774518 +Node: Dynamic Extensions778650 +Node: Internals779907 +Node: Sample Library790910 +Node: Internal File Description791569 +Node: Internal File Ops795262 +Ref: Internal File Ops-Footnote-1800588 +Node: Using Internal File Ops800736 +Node: Future Extensions802759 +Node: Basic Concepts806712 +Node: Basic High Level807469 +Ref: Basic High Level-Footnote-1811501 +Node: Basic Data Typing811695 +Node: Floating Point Issues816132 +Ref: Floating Point Issues-Footnote-1817218 +Node: String Conversion Precision817271 +Ref: String Conversion Precision-Footnote-1818965 +Node: Unexpected Results819074 +Node: POSIX Floating Point Problems820900 +Ref: POSIX Floating Point Problems-Footnote-1824374 +Node: Glossary824412 +Node: Copying848180 +Node: GNU Free Documentation License885737 +Node: Index910874 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 39673e01..83513b9d 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -20,9 +20,9 @@ @c applies to and all the info about who's publishing this edition @c These apply across the board. -@set UPDATE-MONTH October, 2007 +@set UPDATE-MONTH July, 2009 @set VERSION 3.1 -@set PATCHLEVEL 6 +@set PATCHLEVEL 7 @set FSF @@ -110,7 +110,8 @@ Some comments on the layout for TeX. @end iftex @copying -Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc. +Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, +2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. @sp 2 This is Edition @value{EDITION} of @cite{@value{TITLE}: @value{SUBTITLE}}, @@ -118,7 +119,7 @@ for the @value{VERSION}.@value{PATCHLEVEL} (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -130,9 +131,9 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) ``A GNU Manual'' @item -``You have freedom to copy and modify this GNU Manual, like GNU -software. Copies published by the Free Software Foundation raise -funds for GNU development.'' +``You have the freedom to +copy and modify this GNU manual. Buying copies from the FSF +supports it in developing GNU and promoting software freedom.'' @end enumerate @end copying @@ -315,6 +316,7 @@ particular records in a file and perform operations upon them. * Comments:: Adding documentation to @command{gawk} programs. * Quoting:: More discussion of shell quoting issues. +* DOS Quoting:: Quoting in MS-DOS Batch Files. * Sample Data Files:: Sample data files for use in the @command{awk} programs illustrated in this @value{DOCUMENT}. @@ -516,6 +518,7 @@ particular records in a file and perform operations upon them. * AWKPATH Variable:: Searching directories for @command{awk} programs. * Obsolete:: Obsolete Options and/or features. +* Exit Status:: @command{gawk}'s exit status. * Undocumented:: Undocumented Options and Features. * Known Bugs:: Known Bugs in @command{gawk}. * Library Names:: How to best name private global variables @@ -567,6 +570,8 @@ particular records in a file and perform operations upon them. * Simple Sed:: A Simple Stream Editor. * Igawk Program:: A wrapper for @command{awk} that includes files. +* Signature Program:: People do amazing things with too much time + on their hands. * V7/SVR3.1:: The major changes between V7 and System V Release 3.1. * SVR4:: Minor changes between System V Releases 3.1 @@ -1351,16 +1356,27 @@ problem reports electronically, or write to me in care of the publisher. @node How To Contribute @unnumberedsec How to Contribute -As the maintainer of GNU @command{awk}, -I am starting a collection of publicly available @command{awk} -programs. -For more information, -see @uref{ftp://ftp.freefriends.org/arnold/Awkstuff}. -If you have written an interesting @command{awk} program, or have written a -@command{gawk} extension that you would like to -share with the rest of the world, please contact me (@email{arnold@@skeeve.com}). -Making things available on the Internet helps keep the -@command{gawk} distribution down to manageable size. +As the maintainer of GNU @command{awk}, I once thought that I would be +able to manage a collection of publicly available @command{awk} programs +and I even solicited contributions. Making things available on the Internet +helps keep the @command{gawk} distribution down to manageable size. + +The initial collection of material, such as it is, is still available +at @uref{ftp://ftp.freefriends.org/arnold/Awkstuff}. In the hopes of +doing something more broad, I acquired the @code{awk.info} domain. + +However, I found that I could not dedicate enough time to managing +contributed code: the archive did not grow and the domain went unused +for several years. + +Fortunately, late in 2008, a volunteer took on the task of setting up +an @command{awk}-related web site @uref{http://awk.info} and did a very +nice job. + +If you have written an interesting @command{awk} program, or have written +a @command{gawk} extension that you would like to share with the rest +of the world, please see @uref{http://awk.info/?contribute} for how to +contribute it to the web site. @node Acknowledgments @unnumberedsec Acknowledgments @@ -1448,7 +1464,7 @@ internationalization features. @cindex Buening, Andreas @cindex Deifik, Scott @cindex Hankerson, Darrel -@cindex Hasegawa, Isamu +@c @cindex Hasegawa, Isamu @cindex Jaegermann, Michal @cindex Kahrs, J@"urgen @cindex Rankin, Pat @@ -1459,7 +1475,7 @@ Martin Brown, Andreas Buening, Scott Deifik, Darrel Hankerson, -Isamu Hasegawa, +@c Isamu Hasegawa, Michal Jaegermann, J@"urgen Kahrs, Pat Rankin, @@ -1975,6 +1991,10 @@ The next @value{SUBSECTION} describes the shell's quoting rules. @subsection Shell-Quoting Issues @cindex quoting, rules for +@menu +* DOS Quoting:: Quoting in MS-DOS Batch Files. +@end menu + For short to medium length @command{awk} programs, it is most convenient to enter the program on the @command{awk} command line. This is best done by enclosing the entire program in single quotes. @@ -2130,6 +2150,52 @@ If you really need both single and double quotes in your @command{awk} program, it is probably best to move it into a separate file, where the shell won't be part of the picture, and you can say what you mean. +@node DOS Quoting +@subsubsection Quoting in MS-DOS Batch Files + +@ignore +Date: Wed, 21 May 2008 09:58:43 +0200 (CEST) +From: jeroen.brink@inter.NL.net +Subject: (g)awk "contribution" +To: arnold@skeeve.com +Message-id: <42220.193.172.132.34.1211356723.squirrel@webmail.internl.net> + +Hello Arnold, + +maybe you can help me out. Found your email on the GNU/awk online manual +pages. + +I've searched hard to figure out how, on Windows, to print double quotes. +Couldn't find it in the Quotes area, nor on google or elsewhere. Finally i +figured out how to do this myself. + +How to print all lines in a file surrounded by double quotes (on Windows): + +gawk "{ print \"\042\" $0 \"\042\" }" <file> + +Maybe this is a helpfull tip for other (Windows) gawk users. However, i +don't have a clue as to where to "publish" this tip! Do you? + +Kind regards, + +Jeroen Brink +@end ignore + +Although this @value{DOCUMENT} generally only worries about POSIX systems and the +POSIX shell, the following issue arises often enough for many users that +it is worth addressing. + +Systems providing an MS-DOS compatible ``shell'' use the double-quote +character for quoting, and make it difficult or impossible to include an +escaped double-quote character in a command-line script. +The following example, courtesy of Jeroen Brink, shows +how to print all lines in a file surrounded by double quotes: + +@example +gawk "@{ print \"\042\" $0 \"\042\" @}" @var{file} +@end example + + @node Sample Data Files @section @value{DDF}s for the Examples @c For gawk >= 3.2, update these data files. No-one has such slow modems! @@ -2316,7 +2382,7 @@ expand data | awk '@{ if (x < length()) x = length() @} END @{ print "maximum line length is " x @}' @end example -The input is processed by the @command{expand} utility to change tabs +The input is processed by the @command{expand} utility to change TABs into spaces, so the widths compared are actually the right-margin columns. @item @@ -4621,7 +4687,7 @@ can massage it first with a separate @command{awk} program.) @cindex newlines, as field separators @cindex whitespace, as field separators Fields are normally separated by whitespace sequences -(spaces, tabs, and newlines), not by single spaces. Two spaces in a row do not +(spaces, TABs, and newlines), not by single spaces. Two spaces in a row do not delimit an empty field. The default value of the field separator @code{FS} is a string containing a single space, @w{@code{" "}}. If @command{awk} interpreted this value in the usual way, each space character would separate @@ -4673,9 +4739,9 @@ bracket). This regular expression matches a single space and nothing else There is an important difference between the two cases of @samp{FS = @w{" "}} (a single space) and @samp{FS = @w{"[ \t\n]+"}} -(a regular expression matching one or more spaces, tabs, or newlines). +(a regular expression matching one or more spaces, TABs, or newlines). For both values of @code{FS}, fields are separated by @dfn{runs} -(multiple adjacent occurrences) of spaces, tabs, +(multiple adjacent occurrences) of spaces, TABs, and/or newlines. However, when the value of @code{FS} is @w{@code{" "}}, @command{awk} first strips leading and trailing whitespace from the record and then decides where the fields are. @@ -4718,6 +4784,42 @@ with leading whitespace intact. The assignment to @code{$2} rebuilds separated by the value of @code{OFS}. Because the leading whitespace was ignored when finding @code{$1}, it is not part of the new @code{$0}. Finally, the last @code{print} statement prints the new @code{$0}. + +@cindex @code{FS}, containing @samp{^} +@cindex @samp{^}, in @code{FS} +@cindex dark corner, @samp{^}, in @code{FS} +There is an additional subtlety to be aware of when using regular exressions +for field splitting. +It is not well-specified in the POSIX standard, or anywhere else, what @samp{^} +means when splitting fields. Does the @samp{^} match only at the beginning of +the entire record? Or is each field separator a new string? It turns out that +different @command{awk} versions answer this question differently, and you +should not rely on any specific behavior in your programs. +@value{DARKCORNER} + +As a point of information, the Bell Labs @command{awk} allows @samp{^} +to match only at the beginning of the record. Versions of @command{gawk} +after 3.1.6 also work this way. For example: + +@example +$ echo 'xxAA xxBxx C' | +> nawk -F '(^x+)|( +)' '@{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i @}' +@print{} --><-- +@print{} -->AA<-- +@print{} -->xxBxx<-- +@print{} -->C<-- + +$ echo 'xxAA xxBxx C' | +> gawk-3.1.6 -F '(^x+)|( +)' '@{ for (i = 1; i <= NF; i++) printf "-->%s<--\n", $i @}' +@print{} --><-- +@print{} -->AA<-- +@print{} --><-- +@print{} -->Bxx<-- +@print{} -->C<-- +@end example + +@noindent +As mentioned, @command{gawk} now behaves like the Bell Labs @command{awk}. @c ENDOFRANGE regexpfs @c ENDOFRANGE fsregexp @@ -4806,7 +4908,7 @@ As a special case, in compatibility mode if the argument to @option{-F} is @samp{t}, then @code{FS} is set to the TAB character. If you type @samp{-F\t} at the shell, without any quotes, the @samp{\} gets deleted, so @command{awk} -figures that you really want your fields to be separated with tabs and +figures that you really want your fields to be separated with TABs and not @samp{t}s. Use @samp{-v FS="t"} or @samp{-F"[t]"} on the command line if you really do want to separate your fields with @samp{t}s. @@ -5358,6 +5460,7 @@ processing on the next record @emph{right now}. For example: # value of `tmp' will be "" if t is 1 tmp = substr($0, 1, t - 1) u = index(substr($0, t + 2), "*/") + offset = t + 2 while (u == 0) @{ if (getline <= 0) @{ m = "unexpected EOF or error" @@ -5366,10 +5469,11 @@ processing on the next record @emph{right now}. For example: exit @} u = index($0, "*/") + offset = 0 @} # substr expression will be "" if */ # occurred at end of line - $0 = tmp substr($0, u + 2) + $0 = tmp substr($0, offset + u + 2) @} print $0 @} @@ -6172,6 +6276,20 @@ This prints a number as an ASCII character; thus, @samp{printf "%c", 65} outputs the letter @samp{A}. (The output for a string value is the first character of the string.) +@cindex dark corner, format-control characters +@cindex @command{gawk}, format-control characters +@quotation NOTE +The @samp{%c} format does @emph{not} handle values outside the range +0--255. On most systems, values from 0--127 are within the range of +ASCII and will yield an ASCII character. Values in the range 128--255 +may format as characters in some extended character set, or they may not. +System 390 (IBM architecture mainframe) systems use 8-bit characters, +and thus values from 0--255 yield the corresponding EBCDIC character. +Any value above 255 is treated as modulo 255; i.e., the lowest eight bits +of the value are used. The locale and character set are always ignored. +@end quotation + + @item %d@r{,} %i These are equivalent; they both print a decimal integer. (The @samp{%i} specification is for compatibility with ISO C.) @@ -7775,7 +7893,7 @@ specifier (@pxref{String Functions}). @code{CONVFMT}'s default value is @code{"%.6g"}, which prints a value with -at least six significant digits. For some applications, you might want to +at most six significant digits. For some applications, you might want to change it to specify more precision. On most modern machines, 17 digits is enough to capture a floating-point number's @@ -8604,7 +8722,7 @@ attribute. @item Fields, @code{getline} input, @code{FILENAME}, @code{ARGV} elements, @code{ENVIRON} elements, and the -elements of an array created by @code{split} that are numeric strings +elements of an array created by @code{split} and @code{match} that are numeric strings have the @var{strnum} attribute. Otherwise, they have the @var{string} attribute. Uninitialized variables also have the @var{strnum} attribute. @@ -10685,6 +10803,11 @@ BEGIN @{ close("date") @} @end example + +For full portability, exit values should be between zero and 126, inclusive. +Negative values, and values of 127 or greater, may not produce consistent +results across different operating systems. + @c ENDOFRANGE csta @c ENDOFRANGE acs @c ENDOFRANGE accs @@ -10737,6 +10860,8 @@ specific to @command{gawk} are marked with a pound sign@w{ (@samp{#}).} On non-POSIX systems, this variable specifies use of binary mode for all I/O. Numeric values of one, two, or three specify that input files, output files, or all files, respectively, should use binary I/O. +A numeric value less than zero is treated as zero, and a numeric value greater than +three is treated as three. Alternatively, string values of @code{"r"} or @code{"w"} specify that input files and output files, respectively, should use binary I/O. @@ -10803,9 +10928,9 @@ specify the behavior when @code{FS} is the null string.) @cindex POSIX @command{awk}, @code{FS} variable and The default value is @w{@code{" "}}, a string consisting of a single space. As a special exception, this value means that any -sequence of spaces, tabs, and/or newlines is a single separator.@footnote{In +sequence of spaces, TABs, and/or newlines is a single separator.@footnote{In POSIX @command{awk}, newline does not count as whitespace.} It also causes -spaces, tabs, and newlines at the beginning and end of a record to be ignored. +spaces, TABs, and newlines at the beginning and end of a record to be ignored. You can set the value of @code{FS} on the command line using the @option{-F} option: @@ -12588,8 +12713,30 @@ version of the standard. Therefore, for programs to be maximally portable, always supply the parentheses. @end quotation +@cindex dark corner, @code{length} function +If @code{length} is called with a variable that has not been used, +@command{gawk} forces the variable to be a scalar. Other +implementations of @command{awk} leave the variable without a type. +@value{DARKCORNER} +Consider: + +@example +$ gawk 'BEGIN @{ print length(x) ; x[1] = 1 @}' +@print{} 0 +@error{} gawk: fatal: attempt to use scalar `x' as array + +$ nawk 'BEGIN @{ print length(x) ; x[1] = 1 @}' +@print{} 0 +@end example + +@noindent +If @option{--lint} has +been specified on the command line, @command{gawk} issues a +warning about this. + + @cindex differences between @command{gawk} and @command{awk} -Beginning with @command{gawk} @value{PVERSION} 3.2, when supplied an +Beginning with @command{gawk} @value{PVERSION} 3.1.5, when supplied an array argument, the @code{length} function returns the number of elements in the array. This is less useful than it might seem at first, as the array is not guaranteed to be indexed from one to the number of elements @@ -13513,6 +13660,9 @@ is to allow no argument at all. In this case, the buffer for the standard output is flushed. The second is to allow the null string (@w{@code{""}}) as the argument. In this case, the buffers for @emph{all} open output files and pipes are flushed. +Current versions of the Bell Labs @command{awk} also +support these extensions. +@c As of 2002, but I didn't know about it until 4/2009! @c @cindex automatic warnings @c @cindex warnings, automatic @@ -14479,14 +14629,18 @@ underscores that doesn't start with a digit. Within a single @command{awk} program, any particular name can only be used as a variable, array, or function. -@c NEXT ED: parameter-list is an OPTIONAL list of ... -@var{parameter-list} is a list of the function's arguments and local +@var{parameter-list} is an optional list of the function's arguments and local variable names, separated by commas. When the function is called, the argument names are used to hold the argument values given in the call. The local variables are initialized to the empty string. A function cannot have two parameters with the same name, nor may it have a parameter with the same name as the function itself. +According to the POSIX standard, function parameters cannot have the same +name as one of the special built-in variables +(@pxref{Built-in Variables}. Not all versions of @command{awk} +enforce this restriction. + The @var{body-of-function} consists of @command{awk} statements. It is the most important part of the definition, because it says what the function should actually @emph{do}. The argument names exist to give the body a @@ -14688,7 +14842,7 @@ being a string concatenation): foo(x y, "lose", 4 * z) @end example -@strong{Caution:} Whitespace characters (spaces and tabs) are not allowed +@strong{Caution:} Whitespace characters (spaces and TABs) are not allowed between the function name and the open-parenthesis of the argument list. If you write whitespace by mistake, @command{awk} might think that you mean to concatenate a variable with an expression in parentheses. However, it @@ -16271,7 +16425,7 @@ those statements were executed. @cindex @code{@{@}} (braces), @command{pgawk} program @cindex braces (@code{@{@}}), @command{pgawk} program @item -The layout uses ``K&R'' style with tabs. +The layout uses ``K&R'' style with TABs. Braces are used everywhere, even when the body of an @code{if}, @code{else}, or loop is only a single statement. @@ -16423,6 +16577,7 @@ full details. * AWKPATH Variable:: Searching directories for @command{awk} programs. * Obsolete:: Obsolete Options and/or features. +* Exit Status:: @command{gawk}'s exit status. * Undocumented:: Undocumented Options and Features. * Known Bugs:: Known Bugs in @command{gawk}. @end menu @@ -16576,6 +16731,14 @@ as well as options available in the Bell Laboratories version of @command{awk}. The following list describes @command{gawk}-specific options: @table @code +@item -O +@itemx --optimize +@cindex @code{--optimize} option +@cindex @code{-O} option +Enables some optimizations on the internal representation of the program. +At the moment this includes just simple constant folding. The @command{gawk} +maintainer hopes to add more optimizations over time. + @item -W compat @itemx -W traditional @itemx --compat @@ -17049,6 +17212,26 @@ sense: the @env{AWKPATH} environment variable is used to find the program source files. Once your program is running, all the files have been found, and @command{gawk} no longer needs to use @env{AWKPATH}. +@node Exit Status +@section @command{gawk}'s Exit Status + +@cindex exit status, of @command{gawk} +If the @code{exit} statement is used with a value +(@pxref{Exit Statement}), the @command{gawk} exits with +the numeric value given to it. + +Otherwise, if there were no problems during execution, +@command{gawk} exits with the value of the C constant +@code{EXIT_SUCCESS}. This is usually zero. + +If an error occurs, @command{gawk} exits with the value of +the C constant @code{EXIT_FAILURE}. This is usually one. + +If @command{gawk} exits because of a fatal error, the exit +status is 2. On non-POSIX systems, this value may be mapped +to @code{EXIT_FAILURE}. + + @node Obsolete @section Obsolete Options and/or Features @@ -17820,7 +18003,7 @@ function round(x, ival, aval, fraction) # see if fractional part if (ival == x) # no fraction - return x + return ival # ensure no decimals if (x < 0) @{ aval = -x # absolute value @@ -18403,8 +18586,7 @@ BEGIN @{ @end example @cindex troubleshooting, @code{getline} function -In @command{gawk}, the @code{getline} won't be fatal (unless -@option{--posix} is in force). +This works, because the @code{getline} won't be fatal. Removing the element from @code{ARGV} with @code{delete} skips the file (since it's no longer in the list). @@ -19030,9 +19212,27 @@ char **argv; struct passwd *p; while ((p = getpwent()) != NULL) +@c endfile +@ignore +@c file eg/lib/pwcat.c +#ifdef ZOS_USS + printf("%s:%ld:%ld:%s:%s\n", + p->pw_name, (long) p->pw_uid, + (long) p->pw_gid, p->pw_dir, p->pw_shell); +#else +@c endfile +@end ignore +@c file eg/lib/pwcat.c printf("%s:%s:%ld:%ld:%s:%s:%s\n", p->pw_name, p->pw_passwd, (long) p->pw_uid, (long) p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); +@c endfile +@ignore +@c file eg/lib/pwcat.c +#endif +@c endfile +@end ignore +@c file eg/lib/pwcat.c endpwent(); return 0; @@ -19379,8 +19579,24 @@ char **argv; int i; while ((g = getgrent()) != NULL) @{ +@c endfile +@ignore +@c file eg/lib/grcat.c +#ifdef ZOS_USS + printf("%s:%ld:", g->gr_name, (long) g->gr_gid); +#else +@c endfile +@end ignore +@c file eg/lib/grcat.c printf("%s:%s:%ld:", g->gr_name, g->gr_passwd, (long) g->gr_gid); +@c endfile +@ignore +@c file eg/lib/grcat.c +#endif +@c endfile +@end ignore +@c file eg/lib/grcat.c for (i = 0; g->gr_mem[i] != NULL; i++) @{ printf("%s", g->gr_mem[i]); @group @@ -19394,12 +19610,12 @@ char **argv; return 0; @} @c endfile -@end example @ignore @c file eg/lib/grcat.c #endif /* HAVE_GETGRENT */ @c endfile @end ignore +@end example Each line in the group database represents one group. The fields are separated with colons and represent the following information: @@ -19781,7 +19997,7 @@ The programs are presented in alphabetical order. @cindex columns, cutting The @command{cut} utility selects, or ``cuts,'' characters or fields from its standard input and sends them to its standard output. -Fields are separated by tabs by default, +Fields are separated by TABs by default, but you may supply a command-line option to change the field @dfn{delimiter} (i.e., the field-separator character). @command{cut}'s definition of fields is less general than @command{awk}'s. @@ -20832,7 +21048,7 @@ and nonrepeated lines are counted. @item -@var{n} Skip @var{n} fields before comparing lines. The definition of fields is similar to @command{awk}'s default: nonwhitespace characters separated -by runs of spaces and/or tabs. +by runs of spaces and/or TABs. @item +@var{n} Skip @var{n} characters before comparing lines. Any fields specified with @@ -21089,7 +21305,7 @@ Count only lines. @item -w Count only words. A ``word'' is a contiguous sequence of nonwhitespace characters, separated -by spaces and/or tabs. Luckily, this is the normal way @command{awk} separates +by spaces and/or TABs. Luckily, this is the normal way @command{awk} separates fields in its input data. @item -c @@ -21272,6 +21488,8 @@ We hope you find them both interesting and enjoyable. * Simple Sed:: A Simple Stream Editor. * Igawk Program:: A wrapper for @command{awk} that includes files. +* Signature Program:: People do amazing things with too much time + on their hands. @end menu @node Dupword Program @@ -21562,8 +21780,8 @@ The string on which to do the translation. Associative arrays make the translation part fairly easy. @code{t_ar} holds the ``to'' characters, indexed by the ``from'' characters. Then a simple loop goes through @code{from}, one character at a time. For each character -in @code{from}, if the character appears in @code{target}, @code{gsub} -is used to change it to the corresponding @code{to} character. +in @code{from}, if the character appears in @code{target}, +it is replaced with the corresponding @code{to} character. The @code{translate} function simply calls @code{stranslate} using @code{$0} as the target. The main program sets two global variables, @code{FROM} and @@ -21582,6 +21800,7 @@ Finally, the processing rule simply calls @code{translate} for each record: # # Arnold Robbins, arnold@@skeeve.com, Public Domain # August 1989 +# February 2009 - bug fix @c endfile @end ignore @@ -21590,21 +21809,24 @@ Finally, the processing rule simply calls @code{translate} for each record: # to be spelled out. However, if `to' is shorter than `from', # the last character in `to' is used for the rest of `from'. -function stranslate(from, to, target, lf, lt, t_ar, i, c) +function stranslate(from, to, target, lf, lt, ltarget, t_ar, i, c, + result) @{ lf = length(from) lt = length(to) + ltarget = length(target) for (i = 1; i <= lt; i++) t_ar[substr(from, i, 1)] = substr(to, i, 1) if (lt < lf) for (; i <= lf; i++) t_ar[substr(from, i, 1)] = substr(to, lt, 1) - for (i = 1; i <= lf; i++) @{ - c = substr(from, i, 1) - if (index(target, c) > 0) - gsub(c, t_ar[c], target) + for (i = 1; i <= ltarget; i++) @{ + c = substr(target, i, 1) + if (c in t_ar) + c = t_ar[c] + result = result c @} - return target + return result @} function translate(from, to) @@ -22840,11 +23062,39 @@ upon startup. Instead, it would be very simple to modify @command{igawk} to do this. Since @command{igawk} can process nested @samp{@@include} directives, @file{default.awk} could simply contain @samp{@@include} statements for the desired library functions. + +@c Exercise: make this change @c ENDOFRANGE libfex @c ENDOFRANGE flibex @c ENDOFRANGE awkpex -@c Exercise: make this change +@node Signature Program +@subsection And Now For Something Completely Different + +The following program was written by Davide Brini +@c (@email{dave_br@@gmx.com}) +and is published on @uref{http://db.netsons.org/v1-sigs.php, his website}. +It serves as his signature in the Usenet group @code{comp.lang.awk}. +He supplies the following copyright terms: + +@quotation +Copyright @copyright{} 2008 Davide Brini + +Copying and distribution of the code published in this page, with or without +modification, are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. +@end quotation + +Here is the program: + +@example +awk 'BEGIN@{O="~"~"~";o="=="=="==";o+=+o;x=O""O;while(X++<=x+o+o)c=c"%c"; +printf c,(x-O)*(x-O),x*(x-o)-o,x*(x-O)+x-O-o,+x*(x-O)-x+o,X*(o*o+O)+x-O, +X*(X-x)-o*o,(x+X)*o*o+o,x*(X-x)-O-O,x-O+(O+o+X+x)*(o+O),X*X-X*(x-O)-x+O, +O+X*(o*(o+O)+O),+x+O+X*o,x*(x-o),(o+X+x)*o*o-(x-O-O),O+(X-x)*(X+O),x-O@}' +@end example + +We leave it to you to determine what the program does. @ignore @c Try this @@ -23532,8 +23782,7 @@ The Atari port became officially unsupported (@pxref{Atari Installation}). @item -The source code now uses new-style function definitions, with -@command{ansi2knr} to convert the code on systems with old compilers. +The source code now uses new-style function definitions. @item The @option{--disable-lint} configuration option to disable lint checking @@ -23541,6 +23790,14 @@ at compile time (@pxref{Additional Configuration Options}). @item +The @option{--with-whiny-user-strftime} configuration option +to force the use +of the included version of the @code{strftime} +function for deficient systems +(@pxref{Additional Configuration Options}). + + +@item POSIX compliance for @code{sub} and @code{gsub} (@pxref{Gory Details}). @@ -23558,6 +23815,12 @@ The @code{strftime} function acquired a third argument to enable printing times as UTC (@pxref{Time Functions}). +@item +The @option{--disable-libsigsegv} configuration option which +disables configuring, building, compiling and linking against +the @code{libsigsegv} library +(@pxref{Additional Configuration Options}). + @end itemize @c XXX ADD MORE STUFF HERE @@ -24135,6 +24398,12 @@ Enable the recognition and execution of C-style @code{switch} statements in @command{awk} programs (@pxref{Switch Statement}.) +@cindex @code{--with-whiny-user-strftime} configuration option +@cindex configuration option, @code{--with-whiny-user-strftime} +@item --with-whiny-user-strftime +Force use of the included version of the @code{strftime} +function for deficient systems + @cindex @code{--disable-lint} configuration option @cindex configuration option, @code{--disable-lint} @item --disable-lint @@ -24166,6 +24435,13 @@ improvement. @cindex configuration option, @code{--disable-directories-fatal} @item --disable-directories-fatal Causes @command{gawk} to silently skip directories named on the command line. + +@cindex @code{--disable-libsigsegv} configuration option +@cindex configuration option, @code{--disable-libsigsegv} +@item --disable-libsigsegv +The @option{--disable-libsigsegv} configuration option +disables configuring, building, compiling and linking against +the @code{libsigsegv} library. @end table As of version 3.1.5, the @option{--with-included-gettext} configuration @@ -24500,7 +24776,8 @@ The @code{pid} test fails because child processes are not started by Most OS/2 ports of GNU @command{make} are not able to handle the Makefiles of this package. If you encounter any problems with @command{make} try GNU Make 3.79.1 or later versions. You should find the latest -version on @uref{http://www.unixos2.org/sw/pub/binary/make/} or on +version on +@c @uref{http://www.unixos2.org/sw/pub/binary/make/} or on @uref{ftp://hobbes.nmsu.edu/pub/os2/}. @end quotation @@ -24611,19 +24888,18 @@ control over these translations and is interpreted as follows: @itemize @bullet @item -If @code{BINMODE} is @samp{"r"}, or -@code{(BINMODE & 1)} is nonzero, then +If @code{BINMODE} is @samp{"r"}, or one, +then binary mode is set on read (i.e., no translations on reads). @item -If @code{BINMODE} is @code{"w"}, or -@code{(BINMODE & 2)} is nonzero, then +If @code{BINMODE} is @code{"w"}, or two, +then binary mode is set on write (i.e., no translations on writes). @item -If @code{BINMODE} is @code{"rw"} or @code{"wr"}, -binary mode is set for both read and write -(same as @code{(BINMODE & 3)}). +If @code{BINMODE} is @code{"rw"} or @code{"wr"} or three, +binary mode is set for both read and write. @item @code{BINMODE=@var{non-null-string}} is @@ -24932,7 +25208,7 @@ The Atari port is no longer supported. It is included for those who might want to use it but it is no longer being actively maintained. -@c based on material from Michal Jaegermann <michal@gortel.phys.ualberta.ca> +@c based on material from Michal Jaegermann <michal@gortel.phys.ualberta.ca>, now michal@harddata.com @cindex atari @cindex installation, atari There are no substantial differences when installing @command{gawk} on @@ -25142,6 +25418,18 @@ While the @command{gawk} developers do occasionally read this newsgroup, there is no guarantee that we will see your posting. The steps described above are the official recognized ways for reporting bugs. +@quotation NOTE +Many distributions of GNU/Linux and the various BSD-based operating systems +have their own bug reporting systems. If you report a bug using your distribution's +bug reporting system, @emph{please} also send a copy to @email{bug-gawk@@gnu.org}. + +This is for two reasons. First, while some distributions forward +bug reports ``upstream'' to the GNU mailing list, many don't, so there is a good +chance that the @command{gawk} maintainer won't even see the bug report! Second, +mail to the GNU list is archived, and having everything at the GNU project +keeps things self-contained and not dependant on other web sites. +@end quotation + Non-bug suggestions are always welcome as well. If you have questions about things that are unclear in the documentation or are just obscure features, ask me; I will try to help you out, although I @@ -25157,61 +25445,41 @@ authoritative if it conflicts with this @value{DOCUMENT}. The people maintaining the non-Unix ports of @command{gawk} are as follows: +@multitable {Tandem (POSIX-compliant)} {123456789012345678901234567890123456789001234567890} @ignore -@table @asis -@cindex Fish, Fred -@item Amiga -Fred Fish, @email{fnf@@ninemoons.com}. - -@cindex Brown, Martin -@item BeOS -Martin Brown, @email{mc@@whoever.com}. - -@cindex Deifik, Scott -@cindex Hankerson, Darrel -@item MS-DOS -Scott Deifik, @email{scottd.mail@@sbcglobal.net} and -Darrel Hankerson, @email{hankedr@@mail.auburn.edu}. - -@cindex Grigera, Juan -@item MS-Windows -Juan Grigera, @email{juan@@biophnet.unlp.edu.ar}. - -@item OS/2 -Andreas Buening, @email{andreas.buening@@nexgo.de}. - -@cindex Davies, Stephen -@item Tandem -Stephen Davies, @email{scldad@@sdc.com.au}. - -@cindex Rankin, Pat -@item VMS -Pat Rankin, @email{rankin@@pactechdata.com}. -@end table -@end ignore - -@multitable {MS-Windows} {123456789012345678901234567890123456789001234567890} +@c Fred is no longer living, sadly. @cindex Fish, Fred @item Amiga @tab Fred Fish, @email{fnf@@ninemoons.com}. +@c not supported @cindex Brown, Martin @item BeOS @tab Martin Brown, @email{mc@@whoever.com}. +@end ignore @cindex Deifik, Scott -@cindex Hankerson, Darrel -@item MS-DOS @tab Scott Deifik, @email{scottd.mail@@sbcglobal.net} and -Darrel Hankerson, @email{hankedr@@mail.auburn.edu}. +@c @cindex Hankerson, Darrel +@item MS-DOS @tab Scott Deifik, @email{scottd.mail@@sbcglobal.net}. +@c and Darrel Hankerson, @email{hankedr@@auburn.edu}. +@c not supported +@ignore @cindex Grigera, Juan -@item MS-Windows @tab Juan Grigera, @email{juan@@biophnet.unlp.edu.ar}. +@item MS-Windows @tab Juan Grigera, @email{juan@@grigera.com.ar}. +@end ignore -@item OS/2 @tab The Unix for OS/2 team, @email{gawk-maintainer@@unixos2.org}. +@cindex Buening, Andreas +@item OS/2 @tab Andreas Buening, @email{andreas.buening@@nexgo.de} @cindex Davies, Stephen @item Tandem @tab Stephen Davies, @email{scldad@@sdc.com.au}. +@cindex Wildenhues, Ralf +@item Tandem (POSIX-compliant) @tab Ralf Wildenhues @email{Ralf.Wildenhues@@gmx.de} @cindex Rankin, Pat @item VMS @tab Pat Rankin, @email{rankin@@pactechdata.com}. + +@cindex Pitts, Dave +@item z/OS (OS/390) @tab Dave Pitts, @email{pitts@@cozx.com}. @end multitable If your bug is also reproducible under Unix, please send a copy of your @@ -25247,18 +25515,18 @@ This @value{SECTION} briefly describes where to get them: Brian Kernighan has made his implementation of @command{awk} freely available. You can retrieve this version via the World Wide Web from -his home page.@footnote{@uref{http://cm.bell-labs.com/who/bwk}} +his home page.@footnote{@uref{http://www.cs.princeton.edu/~bwk}} It is available in several archive formats: @table @asis @item Shell archive -@uref{http://cm.bell-labs.com/who/bwk/awk.shar} +@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.shar} @item Compressed @command{tar} file -@uref{http://cm.bell-labs.com/who/bwk/awk.tar.gz} +@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.tar.gz} @item Zip file -@uref{http://cm.bell-labs.com/who/bwk/awk.zip} +@uref{http://www.cs.princeton.edu/~bwk/btl.mirror/awk.zip} @end table This version requires an ISO C (1990 standard) compiler; @@ -25278,11 +25546,23 @@ called @command{mawk}. It is available under the GPL (@pxref{Copying}), just as @command{gawk} is. +@ignore You can get it via anonymous @command{ftp} to the host @code{@w{ftp.whidbey.net}}. Change directory to @file{/pub/brennan}. Use ``binary'' or ``image'' mode, and retrieve @file{mawk1.3.3.tar.gz} (or the latest version that is there). +@end ignore + +The original distribution site for the @command{mawk} source code +no longer has it. A copy has been made available at +@uref{http://www.skeeve.com/gawk/mawk1.3.3.tar.gz}. +In 2009, Thomas Dickey took on @command{mawk} maintenance. +Basic information is availabe on +@uref{http://www.invisible-island.net/mawk/mawk.html, the project's web page}. +The download URL is @uref{ftp://invisible-island.net/mawk/mawk.tar.gz}. + +Once you have it, @command{gunzip} may be used to decompress this file. Installation is similar to @command{gawk}'s (@pxref{Unix Installation}). @@ -25333,7 +25613,8 @@ The @code{BINMODE} special variable for non-Unix operating systems (@pxref{PC Using}). @end itemize -The next version of @command{mawk} will support @code{nextfile}. +It is to be hoped that a future version of @command{mawk} will support @code{nextfile} +(@pxref{Nextfile Statement}). @cindex Sumner, Andrew @cindex @command{awka} compiler for @command{awk} @@ -25360,9 +25641,9 @@ It is different from @command{pgawk} (@pxref{Profiling}), in that it uses CPU-based profiling, not line-count profiling. You may find it at either -@uref{ftp://ftp.math.utah.edu/pub/pawk/pawk-20020210.tar.gz} +@uref{ftp://ftp.math.utah.edu/pub/pawk/pawk-20030606.tar.gz} or -@uref{http://www.math.utah.edu/pub/pawk/pawk-20020210.tar.gz}. +@uref{http://www.math.utah.edu/pub/pawk/pawk-20030606.tar.gz}. @cindex OpenSolaris @cindex Solaris, POSIX compliant @command{awk} @@ -25385,6 +25666,14 @@ for I/O and for regexp matching, the language it supports is different from POSIX @command{awk}. More information is available on the project's home page.@footnote{@uref{http://jawk.sourceforge.net}}. +@cindex @command{QTawk} +@cindex QuikTrim Awk +This is an independent implementation of @command{awk} distributed +under the GPL. It has a large number of extensions over standard +@command{awk} and may not be 100% syntactically compatible with it. +See @uref{http://www.quiktrim.org/QTawk.html} for more information, +including the manual and a download link. + @end table @c ENDOFRANGE gligawk @c ENDOFRANGE ingawk @@ -25507,7 +25796,7 @@ Use the @command{gawk} coding style. The C code for @command{gawk} follows the instructions in the @cite{GNU Coding Standards}, with minor exceptions. The code is formatted using the traditional ``K&R'' style, particularly as regards to the placement -of braces and the use of tabs. In brief, the coding rules for @command{gawk} +of braces and the use of TABs. In brief, the coding rules for @command{gawk} are as follows: @itemize @bullet @@ -25537,7 +25826,7 @@ Do not use the comma operator to produce multiple side effects, except in @code{for} loop initialization and increment parts, and in macro bodies. @item -Use real tabs for indenting, not spaces. +Use real TABs for indenting, not spaces. @item Use the ``K&R'' brace layout style. @@ -28720,17 +29009,21 @@ applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. + +@c The GNU Free Documentation License. @node GNU Free Documentation License @unnumbered GNU Free Documentation License - @cindex FDL (Free Documentation License) @cindex Free Documentation License (FDL) @cindex GNU Free Documentation License -@center Version 1.2, November 2002 +@center Version 1.3, 3 November 2008 + +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. @display -Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +@uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -28835,6 +29128,9 @@ formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. +The ``publisher'' means any person or entity that distributes copies +of the Document to the public. + A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a @@ -29067,7 +29363,7 @@ and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. -When the Document is included an aggregate, this License does not +When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. @@ -29103,13 +29399,30 @@ title. @item TERMINATION -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document is void, and will -automatically terminate your rights under this License. However, -parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such -parties remain in full compliance. +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE @@ -29127,7 +29440,42 @@ following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +@item +RELICENSING + +``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the +site means any set of copyrightable works thus published on the MMC +site. + +``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +``Incorporate'' means to publish or republish a Document, in whole or +in part, as part of another Document. + +An MMC is ``eligible for relicensing'' if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + @end enumerate @c fakenode --- for prepinfo @@ -29141,16 +29489,16 @@ license notices just after the title page: @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 + under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the ``with...Texts.'' line with this: +replace the ``with@dots{}Texts.'' line with this: @smallexample @group diff --git a/doc/gawkinet.info b/doc/gawkinet.info index a496f6a2..ff8eb9b9 100644 --- a/doc/gawkinet.info +++ b/doc/gawkinet.info @@ -6,14 +6,15 @@ This is gawkinet.info, produced by makeinfo version 4.11 from gawkinet.texi. END-INFO-DIR-ENTRY This is Edition 1.1 of `TCP/IP Internetworking With `gawk'', for the -3.1.4 (or later) version of the GNU implementation of AWK. +3.1.7 (or later) version of the GNU implementation of AWK. - Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2004, 2009 Free Software Foundation, +Inc. Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -22,21 +23,22 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) a. "A GNU Manual" - b. "You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development." + b. "You have the freedom to copy and modify this GNU manual. Buying + copies from the FSF supports it in developing GNU and promoting + software freedom." This file documents the networking features in GNU `awk'. This is Edition 1.1 of `TCP/IP Internetworking With `gawk'', for the -3.1.4 (or later) version of the GNU implementation of AWK. +3.1.7 (or later) version of the GNU implementation of AWK. - Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2004, 2009 Free Software Foundation, +Inc. Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -45,9 +47,9 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) a. "A GNU Manual" - b. "You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development." + b. "You have the freedom to copy and modify this GNU manual. Buying + copies from the FSF supports it in developing GNU and promoting + software freedom." File: gawkinet.info, Node: Top, Next: Preface, Prev: (dir), Up: (dir) @@ -59,14 +61,15 @@ This file documents the networking features in GNU Awk (`gawk') version 3.1 and later. This is Edition 1.1 of `TCP/IP Internetworking With `gawk'', for the -3.1.4 (or later) version of the GNU implementation of AWK. +3.1.7 (or later) version of the GNU implementation of AWK. - Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2004, 2009 Free Software Foundation, +Inc. Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License", the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -75,9 +78,9 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) a. "A GNU Manual" - b. "You have freedom to copy and modify this GNU Manual, like GNU - software. Copies published by the Free Software Foundation raise - funds for GNU development." + b. "You have the freedom to copy and modify this GNU manual. Buying + copies from the FSF supports it in developing GNU and promoting + software freedom." * Menu: @@ -1655,7 +1658,7 @@ holds the HTML page contents: } else if (MENU[2] == "AboutELIZA") { Document = "This is an implementation of the famous ELIZA\ program by Joseph Weizenbaum. It is written in GAWK and\ - /bin/sh: expad: command not found + uses an HTML GUI." } else if (MENU[2] == "StartELIZA") { gsub(/\+/, " ", GETARG["YouSay"]) # Here we also have to substitute coded special characters @@ -3729,10 +3732,10 @@ File: gawkinet.info, Node: GNU Free Documentation License, Next: Index, Prev: GNU Free Documentation License ****************************** - Version 1.2, November 2002 + Version 1.3, 3 November 2008 - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -3834,6 +3837,9 @@ GNU Free Documentation License Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + The "publisher" means any person or entity that distributes copies + of the Document to the public. + A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ @@ -4063,7 +4069,7 @@ GNU Free Documentation License a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual - works permit. When the Document is included an aggregate, this + works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. @@ -4099,12 +4105,29 @@ GNU Free Documentation License 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document - except as expressly provided for under this License. Any other - attempt to copy, modify, sublicense or distribute the Document is - void, and will automatically terminate your rights under this - License. However, parties who have received copies, or rights, - from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from + you under this License. If your rights have been terminated and + not permanently reinstated, receipt of a copy of some or all of + the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE @@ -4122,7 +4145,41 @@ GNU Free Documentation License published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the - Free Software Foundation. + Free Software Foundation. If the Document specifies that a proxy + can decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + ADDENDUM: How to use this License for your documents ==================================================== @@ -4133,10 +4190,10 @@ notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 + under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover @@ -4347,58 +4404,58 @@ Index Tag Table: -Node: Top2007 -Node: Preface5697 -Node: Introduction7072 -Node: Stream Communications8098 -Node: Datagram Communications9271 -Node: The TCP/IP Protocols10902 -Ref: The TCP/IP Protocols-Footnote-111586 -Node: Basic Protocols11743 -Node: Ports13065 -Node: Making Connections14470 -Ref: Making Connections-Footnote-117051 -Ref: Making Connections-Footnote-217098 -Node: Using Networking17279 -Node: Gawk Special Files19633 -Node: Special File Fields21637 -Ref: table-inet-components25387 -Node: Comparing Protocols27299 -Node: File /inet/tcp27888 -Node: File /inet/udp28914 -Node: File /inet/raw30035 -Ref: File /inet/raw-Footnote-133068 -Node: TCP Connecting33148 -Node: Troubleshooting35486 -Ref: Troubleshooting-Footnote-138537 -Node: Interacting39081 -Node: Setting Up41811 -Node: Email45305 -Node: Web page47631 -Ref: Web page-Footnote-150436 -Node: Primitive Service50633 -Node: Interacting Service53367 -Ref: Interacting Service-Footnote-162496 -Node: CGI Lib62528 -Node: Simple Server69489 -Ref: Simple Server-Footnote-177219 -Node: Caveats77320 -Node: Challenges78463 -Node: Some Applications and Techniques87130 -Node: PANIC89587 -Node: GETURL91305 -Node: REMCONF93928 -Node: URLCHK99404 -Node: WEBGRAB103239 -Node: STATIST107689 -Ref: STATIST-Footnote-1119397 -Node: MAZE119842 -Node: MOBAGWHO126030 -Ref: MOBAGWHO-Footnote-1139974 -Node: STOXPRED140029 -Node: PROTBASE154284 -Node: Links167366 -Node: GNU Free Documentation License170800 -Node: Index193204 +Node: Top2003 +Node: Preface5691 +Node: Introduction7066 +Node: Stream Communications8092 +Node: Datagram Communications9265 +Node: The TCP/IP Protocols10896 +Ref: The TCP/IP Protocols-Footnote-111580 +Node: Basic Protocols11737 +Node: Ports13059 +Node: Making Connections14464 +Ref: Making Connections-Footnote-117045 +Ref: Making Connections-Footnote-217092 +Node: Using Networking17273 +Node: Gawk Special Files19627 +Node: Special File Fields21631 +Ref: table-inet-components25381 +Node: Comparing Protocols27293 +Node: File /inet/tcp27882 +Node: File /inet/udp28908 +Node: File /inet/raw30029 +Ref: File /inet/raw-Footnote-133062 +Node: TCP Connecting33142 +Node: Troubleshooting35480 +Ref: Troubleshooting-Footnote-138531 +Node: Interacting39075 +Node: Setting Up41805 +Node: Email45299 +Node: Web page47625 +Ref: Web page-Footnote-150430 +Node: Primitive Service50627 +Node: Interacting Service53361 +Ref: Interacting Service-Footnote-162490 +Node: CGI Lib62522 +Node: Simple Server69483 +Ref: Simple Server-Footnote-177206 +Node: Caveats77307 +Node: Challenges78450 +Node: Some Applications and Techniques87117 +Node: PANIC89574 +Node: GETURL91292 +Node: REMCONF93915 +Node: URLCHK99391 +Node: WEBGRAB103226 +Node: STATIST107676 +Ref: STATIST-Footnote-1119384 +Node: MAZE119829 +Node: MOBAGWHO126017 +Ref: MOBAGWHO-Footnote-1139961 +Node: STOXPRED140016 +Node: PROTBASE154271 +Node: Links167353 +Node: GNU Free Documentation License170787 +Node: Index195926 End Tag Table diff --git a/doc/gawkinet.texi b/doc/gawkinet.texi index f1b66073..6abd7ea7 100644 --- a/doc/gawkinet.texi +++ b/doc/gawkinet.texi @@ -62,20 +62,20 @@ @set TITLE TCP/IP Internetworking With @command{gawk} @set EDITION 1.1 -@set UPDATE-MONTH January, 2004 +@set UPDATE-MONTH July, 2009 @c gawk versions: @set VERSION 3.1 -@set PATCHLEVEL 4 +@set PATCHLEVEL 7 @copying This is Edition @value{EDITION} of @cite{@value{TITLE}}, for the @value{VERSION}.@value{PATCHLEVEL} (or later) version of the GNU implementation of AWK. @sp 2 -Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2004, 2009 Free Software Foundation, Inc. @sp 2 Permission is granted to copy, distribute and/or modify this document -under the terms of the GNU Free Documentation License, Version 1.2 or +under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``GNU General Public License'', the Front-Cover texts being (a) (see below), and with the Back-Cover Texts being (b) @@ -87,9 +87,9 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) ``A GNU Manual'' @item -``You have freedom to copy and modify this GNU Manual, like GNU -software. Copies published by the Free Software Foundation raise -funds for GNU development.'' +``You have the freedom to +copy and modify this GNU manual. Buying copies from the FSF +supports it in developing GNU and promoting software freedom.'' @end enumerate @end copying @@ -2092,7 +2092,7 @@ function HandleGET() @{ @} else if (MENU[2] == "AboutELIZA") @{ Document = "This is an implementation of the famous ELIZA\ program by Joseph Weizenbaum. It is written in GAWK and\ -/bin/sh: expad: command not found + uses an HTML GUI." @} else if (MENU[2] == "StartELIZA") @{ gsub(/\+/, " ", GETARG["YouSay"]) # Here we also have to substitute coded special characters @@ -4723,17 +4723,20 @@ They are presented in the order in which they appear. @end table +@c The GNU Free Documentation License. @node GNU Free Documentation License @unnumbered GNU Free Documentation License - @cindex FDL (Free Documentation License) @cindex Free Documentation License (FDL) @cindex GNU Free Documentation License -@center Version 1.2, November 2002 +@center Version 1.3, 3 November 2008 + +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. @display -Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA +Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +@uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -4838,6 +4841,9 @@ formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. +The ``publisher'' means any person or entity that distributes copies +of the Document to the public. + A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a @@ -5070,7 +5076,7 @@ and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. -When the Document is included an aggregate, this License does not +When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. @@ -5106,13 +5112,30 @@ title. @item TERMINATION -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document is void, and will -automatically terminate your rights under this License. However, -parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such -parties remain in full compliance. +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE @@ -5130,7 +5153,42 @@ following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +@item +RELICENSING + +``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the +site means any set of copyrightable works thus published on the MMC +site. + +``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +``Incorporate'' means to publish or republish a Document, in whole or +in part, as part of another Document. + +An MMC is ``eligible for relicensing'' if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + @end enumerate @c fakenode --- for prepinfo @@ -5144,16 +5202,16 @@ license notices just after the title page: @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 + under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled ``GNU + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the ``with...Texts.'' line with this: +replace the ``with@dots{}Texts.'' line with this: @smallexample @group |