gawk: Extension Sample Revout

1 
1 16.7.7 Reversing Output
1 -----------------------
1 
1 The 'revoutput' extension adds a simple output wrapper that reverses the
1 characters in each output line.  Its main purpose is to show how to
1 write an output wrapper, although it may be mildly amusing for the
1 unwary.  Here is an example:
1 
1      @load "revoutput"
1 
1      BEGIN {
1          REVOUT = 1
1          print "don't panic" > "/dev/stdout"
1      }
1 
1    The output from this program is 'cinap t'nod'.
1