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
- arch rolling: gawk 5.4.1-1 Β· GPL-3.0-or-later
- nixos 26.05: gawk-interactive 5.4.1
- nixpkgs unstable: gawk 5.4.1
- nixpkgs unstable: gawk-interactive 5.4.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms