manpagez: man pages & more
info gawk
Home | html | info | man

File: gawk.info,  Node: Extension Sample Revout,  Next: Extension Sample Rev2way,  Prev: Extension Sample Readdir,  Up: Extension Samples

17.7.7 Reversing Output
-----------------------

The 'revoutput' extension adds a simple output wrapper that reverses the
characters in each output line.  Its main purpose is to show how to
write an output wrapper, although it may be mildly amusing for the
unwary.  Here is an example:

     @load "revoutput"

     BEGIN {
         REVOUT = 1
         print "don't panic" > "/dev/stdout"
     }

   The output from this program is 'cinap t'nod'.

© manpagez.com 2000-2025
Individual documents may contain additional copyright information.