goawk(1)

πŸ“¦
version 1.29.0 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

🌸 goawk 🌸

okay bestie, so this one's from the General Commands Manual, section 1, and it's genuinely iconic β€” meet goawk. πŸ’–


✨ NAME ✨

goawk β€” a POSIX-compliant AWK interpreter with CSV support. yes you read that right. AWK. but with vibes. πŸ¦‹


🌈 SYNOPSIS 🌈

goawk [-F fs] [-v var=value] [-f progfile | 'prog'] [file ...]

that's it. that's the whole summoning ritual. ✨


πŸ’… DESCRIPTION πŸ’…

so goawk is a POSIX-compliant AWK interpreter written in Go. she does everything regular AWK does, no cap. but ALSO β€” and this is the part that has me screaming β€” she has some extra features POSIX AWK simply does not have:

  • Code coverage. yes fr, coverage. πŸ‘‘
  • Proper CSV and TSV support. proper. not the janky kind. πŸŽ€
  • Negative field indexes, so you can grab fields from the right side. main character energy honestly. πŸ’«
  • Single-quoted strings. because sometimes you just want to, okay? 🫢

she ate. periodt.


πŸŽ€ OPTIONS πŸŽ€

πŸ’œ Standard AWK arguments

the classics. the originals. the ones your awk-fluent auntie already knows.

  • --csv β€” turns on CSV input mode. literally the exact same thing as -i csv, just typed differently, iykyk.
  • -F fs β€” use fs as the input field separator. that's it, that's the job.
  • -F progfile β€” read the AWK program source out of progfile. you can stack multiple -f options if you're feeling extra. πŸ’…
  • -v var=val β€” assign the value val to the variable var, and do it before the program even starts running. pre-game assignment, we love to see it.
  • --csv β€”

wait no, ignore that, I already did --csv. moving on bestie 😭

  • -v var=val β€” already covered, she's fine, we're fine, everything's fine.

hold on. let me re-read the list properly, I got excited. here we go, for real this time:

  • --csv β€” enable CSV input mode. Equivalent to -i csv. ✨
  • -F fs β€” use fs for the input field separator. 🌸
  • -F progfile β€” read the AWK program source from progfile. Multiple -f options may be used. πŸ¦‹
  • -v var=val β€” assign the value val to the variable var before the execution of the program begins. πŸŽ€

there. four options. nobody panic. the vibes remain immaculate. 🫢

πŸ”₯ Additional GoAWK features

these are the ones that make her her. the deluxe edition. the DLC you didn't have to pay for. πŸ‘‘

  • -c β€” use Unicode characters for index, length, match, substr, and %c. unicode girlies rise up 🌈
  • -E progfile β€” load the program from progfile, disable var=val arguments, stop processing arguments, parse the header row, and enable @"field" in CSV input mode. she does a LOT in one letter, it's giving multitasking icon πŸ’…
  • -H β€” parse the header row and enable @"field" in CSV input mode. πŸ’–
  • -h, --help β€” show the help message and exit. your friendly lil escape hatch 🫢
  • -i mode β€” parse input into fields using CSV format, ignoring FS and RS. yes bestie, she's overriding them, that's the whole point ✨
  • -o mode β€” use CSV output, ignoring OFS and ORS. same energy, output side πŸŽ€
  • -version β€” show the GoAWK version and exit. just a lil peek πŸ‘€
⚠️ okay heads up queen β€” those last two, -i mode and -o mode? they are NOT shy. they straight up ignore FS, RS, OFS, and ORS. if you set those variables expecting them to matter here, they will simply not be consulted. that's not a bug, that's the deal. πŸ’€

🧚 GoAWK debugging arguments

the inner-workings zone. nerdy in the best way. ⭐

  • -coverappend β€” append to the coverage file instead of overwriting it. so you don't lose your previous runs, cute πŸ“
  • -covermode mode β€” set coverage mode, where mode is set or count. default is set. ✨
  • -coverprofile file β€” write the coverage profile to file. πŸ“Š
  • -cpuprofile file β€” write the cpu profile to file. πŸ”₯
  • -d β€” print the parsed syntax tree to stdout and exit. see the bones of your program πŸ‘‘
  • -da β€” print VM assembly instructions to stdout and exit. down to the metal bestie βš™οΈ
  • -dt β€” print variable type information to stdout and exit. the tea on your types β˜•
  • -memprofile file β€” write the memory profile to file. πŸ’œ

πŸ¦‹ SEE ALSO πŸ¦‹

go check out her cousins, they're family:


and that's the whole page, bestie!! πŸŽ€ slay. this was the goawk(1) manual page, from the General Commands Manual, and the footer says 2026-02-03 β€” so that's the date stamp, she's dated February 3, 2026. go forth and awk responsibly. πŸ’–βœ¨πŸŒΈπŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from