REVTWOWAY(3am)

πŸ’– REVTWOWAY πŸ’– (that's the revtwoway page from the 3am manual, bestie, GNU Awk Extension Modules energy)

okay so real talk, this is a page about a lil extension called revtwoway and it's literally the cutest little demo ever. sit down, hydrate, let's go 🫢


✨ NAME ✨

revtwoway β€” reverse strings sample two-way processor extension. that's it, that's the whole vibe: it reverses your strings and it's a sample of how to do two-way processor stuff. iconic. πŸ’…


🌸 SYNOPSIS 🌸

@load "revtwoway"

BEGIN {
    cmd = "/magic/mirror"
    print "hello, world" |& cmd
    cmd |& getline result
    print result
    close(cmd)
}

look at that. @load it, spin up a command, pipe to it with |&, read back with |& getline, then close(cmd) because we're polite. chef's kiss 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so what does this thing even do. the revtwoway extension adds a simple two-way processor that reverses the characters in each line sent to it, and then sends them back for the AWK program to read. that's the whole bit. you send a line, it flips the line, you read the flipped line. adorable.

and like, its main purpose? it's to show how to write a two-way extension. it's a teaching moment, bestie. it's the tutorial you actually want to read. although, ngl, it may also be mildly amusing πŸ™ˆ so like, sure, enjoy it, it's fun, but don't pretend it's a productivity tool.


πŸ‘‘ SEE ALSO πŸ‘‘

  • GAWK: Effective AWK Programming β€” the book, the bible, the moment πŸ“–
  • and the man pages for the other extensions shipped with gawk, go read those too, they're all doing their own thing ✨

πŸ’œ AUTHOR πŸ’œ

Arnold Robbins, arnold@skeeve.com. king behavior, honestly πŸ‘‘


πŸŽ€ COPYING PERMISSIONS πŸŽ€

Copyright Β© 2012, 2013, 2018, 2026, Free Software Foundation, Inc.

so here's the legal tea, and I need you to actually read it because it matters:

  • permission is granted to make and distribute verbatim copies of this manual page, as long as the copyright notice and this permission notice are preserved on all copies. keep the receipts, babe 🧾
  • 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 gets distributed under the terms of a permission notice identical to this one. same rules, no remixing the fine print πŸ’…
  • permission is granted to copy and distribute translations of this manual page into another language, under the above conditions for modified versions β€” with one exception: that permission notice may be stated in a translation approved by the Foundation 🌈
so like, translate away, remix away, but the permission notice stays, and if you're translating the notice itself you need the Foundation's blessing. no cap.

🌟 and that's the page 🌟

this was the revtwoway page from the GNU Awk Extension Modules set, manual section 3am β€” brought to you by the Free Software Foundation, dated Feb 25 2026. go reverse some strings, you absolute main character πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from