aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extension/ChangeLog7
-rw-r--r--extension/filefuncs.3am5
-rw-r--r--extension/fnmatch.3am5
-rw-r--r--extension/fork.3am5
-rw-r--r--extension/inplace.3am92
-rw-r--r--extension/ordchr.3am5
-rw-r--r--extension/readdir.3am5
-rw-r--r--extension/readfile.3am5
-rw-r--r--extension/revoutput.3am5
-rw-r--r--extension/revtwoway.3am5
-rw-r--r--extension/rwarray.3am5
-rw-r--r--extension/time.3am7
12 files changed, 130 insertions, 21 deletions
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 33fb6459..909e70ba 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-15 Arnold D. Robbins <arnold@skeeve.com>
+
+ * inplace.3am: New file.
+ * filefuncs.3am, fnmatch.3am, fork.3am, ordchr.3am, readdir.3am,
+ readfile.3am, revoutput.3am, revtwoway.3am, rwarray.3am,
+ time.3am: Update copyright dates, add reference to inplace(3am).
+
2013-01-10 Andrew J. Schorr <aschorr@telemetry-investments.com>
* inplace.c (do_inplace_begin): No need to get the 2nd suffix argument,
diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am
index 396502c6..d0eb2acf 100644
--- a/extension/filefuncs.3am
+++ b/extension/filefuncs.3am
@@ -1,4 +1,4 @@
-.TH FILEFUNCS 3am "Dec 25 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH FILEFUNCS 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
filefuncs \- provide some file related functionality to gawk
.SH SYNOPSIS
@@ -331,6 +331,7 @@ distribution for an example.
.IR "GAWK: Effective AWK Programming" ,
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -345,7 +346,7 @@ distribution for an example.
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/fnmatch.3am b/extension/fnmatch.3am
index 61e7f384..e2e8391d 100644
--- a/extension/fnmatch.3am
+++ b/extension/fnmatch.3am
@@ -1,4 +1,4 @@
-.TH FNMATCH 3am "Dec 25 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH FNMATCH 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
fnmatch \- compare a string against a filename wildcard
.SH SYNOPSIS
@@ -88,6 +88,7 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH)
.IR "GAWK: Effective AWK Programming" ,
.IR filefuncs (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -100,7 +101,7 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH)
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/fork.3am b/extension/fork.3am
index 9d89aa56..c87dada4 100644
--- a/extension/fork.3am
+++ b/extension/fork.3am
@@ -1,4 +1,4 @@
-.TH FORK 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH FORK 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
fork, wait, waitpid \- basic process management
.SH SYNOPSIS
@@ -59,6 +59,7 @@ else
.IR "GAWK: Effective AWK Programming" ,
.IR filefuncs (3am),
.IR fnmatch (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -73,7 +74,7 @@ else
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/inplace.3am b/extension/inplace.3am
new file mode 100644
index 00000000..5ca04be2
--- /dev/null
+++ b/extension/inplace.3am
@@ -0,0 +1,92 @@
+.TH INPLACE 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
+.SH NAME
+inplace \- emulate sed/perl/ruby in-place editing
+.SH SYNOPSIS
+.ft CW
+.nf
+@load "inplace"
+
+# Please set INPLACE_SUFFIX to make a backup copy. For example, you may
+# want to set INPLACE_SUFFIX to .bak on the command line or in a BEGIN rule.
+
+BEGINFILE {
+ inplace_begin(FILENAME, INPLACE_SUFFIX)
+}
+
+ENDFILE {
+ inplace_end(FILENAME, INPLACE_SUFFIX)
+}
+.fi
+.ft R
+.SH DESCRIPTION
+The
+.I inplace
+extension adds two functions named
+.B inplace_begin()
+and
+.BR inplace_end() .
+These functions are meant to be invoked from the
+.I inplace.awk
+wrapper (whose contents are displayed above)
+which is installed when
+.I gawk
+is.
+.PP
+By default, each named file on the command line is
+replaced with a new file of the same name whose contents
+are the results of running the AWK program.
+If the user supplies an AWK variable named
+.B INPLACE_SUFFIX
+in a
+.B BEGIN
+rule or on the command line, then the
+.I inplace
+extension concatenates that suffix onto the original
+filename and uses the result as a filename for renaming
+the original.
+... .SH NOTES
+... .SH BUGS
+.SH EXAMPLE
+.ft CW
+.nf
+gawk -i inplace '\f(CIscript\fP' files ...
+.br
+gawk -i inplace -f \f(CIscriptfile\fP files ...
+.fi
+.ft R
+.SH "SEE ALSO"
+.IR "GAWK: Effective AWK Programming" ,
+.IR filefuncs (3am),
+.IR fnmatch (3am),
+.IR fork (3am),
+.IR ordchr (3am),
+.IR readdir (3am),
+.IR readfile (3am),
+.IR revoutput (3am),
+.IR rwarray (3am).
+.SH AUTHOR
+Andrew Schorr,
+.BR schorr@telemetry-investments.com .
+.SH COPYING PERMISSIONS
+Copyright \(co 2012, 2013,
+Free Software Foundation, Inc.
+.PP
+Permission is granted to make and distribute verbatim copies of
+this manual page provided the copyright notice and this permission
+notice are preserved on all copies.
+.ig
+Permission is granted to process this file through troff and print the
+results, provided the printed document carries copying permission
+notice identical to this one except for the removal of this paragraph
+(this paragraph not being relevant to the printed manual page).
+..
+.PP
+Permission is granted to copy and distribute modified versions of this
+manual page under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+.PP
+Permission is granted to copy and distribute translations of this
+manual page 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.
diff --git a/extension/ordchr.3am b/extension/ordchr.3am
index 86312a3a..a2b712ff 100644
--- a/extension/ordchr.3am
+++ b/extension/ordchr.3am
@@ -1,4 +1,4 @@
-.TH ORDCHR 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH ORDCHR 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
ordchr \- convert characters to strings and vice versa
.SH SYNOPSIS
@@ -44,6 +44,7 @@ printf("The string value of 65 is %s\en", chr(65))
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR readdir (3am),
.IR readfile (3am),
.IR revoutput (3am),
@@ -53,7 +54,7 @@ printf("The string value of 65 is %s\en", chr(65))
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/readdir.3am b/extension/readdir.3am
index 297e24be..4ba5abc7 100644
--- a/extension/readdir.3am
+++ b/extension/readdir.3am
@@ -1,4 +1,4 @@
-.TH READDIR 3am "Nov 18 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH READDIR 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
readdir \- directory input parser for gawk
.SH SYNOPSIS
@@ -67,6 +67,7 @@ BEGIN { FS = "/" }
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readfile (3am),
.IR revoutput (3am),
@@ -80,7 +81,7 @@ BEGIN { FS = "/" }
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/readfile.3am b/extension/readfile.3am
index 8daec423..688d9cd5 100644
--- a/extension/readfile.3am
+++ b/extension/readfile.3am
@@ -1,4 +1,4 @@
-.TH READFILE 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH READFILE 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
readfile \- return the entire contents of a file as a string
.SH SYNOPSIS
@@ -37,6 +37,7 @@ if (contents == "" && ERRNO != "") {
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR revoutput (3am),
@@ -46,7 +47,7 @@ if (contents == "" && ERRNO != "") {
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/revoutput.3am b/extension/revoutput.3am
index 61e34124..9c8f062f 100644
--- a/extension/revoutput.3am
+++ b/extension/revoutput.3am
@@ -1,4 +1,4 @@
-.TH REVOUTPUT 3am "Oct 14 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH REVOUTPUT 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
revoutput \- Reverse output strings sample extension
.SH SYNOPSIS
@@ -40,6 +40,7 @@ dlrow ,olleh
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -49,7 +50,7 @@ dlrow ,olleh
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/revtwoway.3am b/extension/revtwoway.3am
index 9f2f040a..3426971e 100644
--- a/extension/revtwoway.3am
+++ b/extension/revtwoway.3am
@@ -1,4 +1,4 @@
-.TH REVTWOWAY 3am "Oct 24 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH REVTWOWAY 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
revtwoway \- Reverse strings sample two-way processor extension
.SH SYNOPSIS
@@ -29,6 +29,7 @@ it may also be mildy amusing.
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -39,7 +40,7 @@ it may also be mildy amusing.
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/rwarray.3am b/extension/rwarray.3am
index 02373973..359d91cd 100644
--- a/extension/rwarray.3am
+++ b/extension/rwarray.3am
@@ -1,4 +1,4 @@
-.TH RWARRAY 3am "Nov 04 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH RWARRAY 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
writea, reada \- write and read gawk arrays to/from files
.SH SYNOPSIS
@@ -69,6 +69,7 @@ ret = reada("arraydump.bin", array)
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -78,7 +79,7 @@ ret = reada("arraydump.bin", array)
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/time.3am b/extension/time.3am
index 42d9bf35..aeb59199 100644
--- a/extension/time.3am
+++ b/extension/time.3am
@@ -1,4 +1,4 @@
-.TH TIME 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension Modules"
+.TH TIME 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension Modules"
.SH NAME
time \- time functions for gawk
.SH SYNOPSIS
@@ -13,7 +13,7 @@ ret = sleep(amount)
The
.I time
extension adds two functions named
-.BR gettimeofday() .
+.B gettimeofday()
and
.BR sleep() ,
as follows.
@@ -51,6 +51,7 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done"
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -64,7 +65,7 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done"
Arnold Robbins,
.BR arnold@skeeve.com .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of