| 1 |
.TH REVOUTPUT 3am "Feb 21 2018" "Free Software Foundation" "GNU Awk Extension Modules" |
| 2 |
.SH NAME |
| 3 |
revoutput \- Reverse output strings sample extension |
| 4 |
.SH SYNOPSIS |
| 5 |
.ft CW |
| 6 |
@load "revoutput" |
| 7 |
.sp |
| 8 |
BEGIN { REVOUT = 1 } # Reverse all output strings |
| 9 |
.ft R |
| 10 |
.SH DESCRIPTION |
| 11 |
The |
| 12 |
.I revoutput |
| 13 |
extension |
| 14 |
adds a simple output wrapper that reverses the characters in each output |
| 15 |
line. |
| 16 |
It's main purpose is to show how to write an output wrapper, although |
| 17 |
it may be mildly amusing for the unwary. |
| 18 |
.\" .SH BUGS |
| 19 |
.SH EXAMPLE |
| 20 |
.ft CW |
| 21 |
.nf |
| 22 |
@load "revoutput" |
| 23 |
|
| 24 |
BEGIN { |
| 25 |
REVOUT = 1 |
| 26 |
print "hello, world" > "/dev/stdout" |
| 27 |
} |
| 28 |
.fi |
| 29 |
.ft R |
| 30 |
.PP |
| 31 |
The output from this program is: |
| 32 |
.PP |
| 33 |
.ft CW |
| 34 |
.nf |
| 35 |
dlrow ,olleh |
| 36 |
.fi |
| 37 |
.ft R |
| 38 |
.SH BUGS |
| 39 |
This extension does not affect the default standard output. |
| 40 |
.SH "SEE ALSO" |
| 41 |
.IR "GAWK: Effective AWK Programming" , |
| 42 |
.IR filefuncs (3am), |
| 43 |
.IR fnmatch (3am), |
| 44 |
.IR fork (3am), |
| 45 |
.IR inplace (3am), |
| 46 |
.IR ordchr (3am), |
| 47 |
.IR readdir (3am), |
| 48 |
.IR readfile (3am), |
| 49 |
.IR rwarray (3am), |
| 50 |
.IR time (3am). |
| 51 |
.SH AUTHOR |
| 52 |
Arnold Robbins, |
| 53 |
.BR [email protected] . |
| 54 |
.SH COPYING PERMISSIONS |
| 55 |
Copyright \(co 2012, 2013, 2018, |
| 56 |
Free Software Foundation, Inc. |
| 57 |
.PP |
| 58 |
Permission is granted to make and distribute verbatim copies of |
| 59 |
this manual page provided the copyright notice and this permission |
| 60 |
notice are preserved on all copies. |
| 61 |
.ig |
| 62 |
Permission is granted to process this file through troff and print the |
| 63 |
results, provided the printed document carries copying permission |
| 64 |
notice identical to this one except for the removal of this paragraph |
| 65 |
(this paragraph not being relevant to the printed manual page). |
| 66 |
.. |
| 67 |
.PP |
| 68 |
Permission is granted to copy and distribute modified versions of this |
| 69 |
manual page under the conditions for verbatim copying, provided that |
| 70 |
the entire resulting derived work is distributed under the terms of a |
| 71 |
permission notice identical to this one. |
| 72 |
.PP |
| 73 |
Permission is granted to copy and distribute translations of this |
| 74 |
manual page into another language, under the above conditions for |
| 75 |
modified versions, except that this permission notice may be stated in |
| 76 |
a translation approved by the Foundation. |
| 77 |
.\" vim: set filetype=nroff : |