GBCONVTABLE(1)

✨ gbconvtable β€” bestie edition ✨

okay so you found the gbconvtable page in the User Commands section and you're like "what is this" β€” don't worry, I got you πŸ’–


πŸŽ€ NAME πŸŽ€

gbconvtable β€” Replace keys with values


πŸ¦‹ SYNOPSIS πŸ¦‹

gbconvtable [options]

🌸 DESCRIPTION 🌸

Okay so here's the vibe: this program swaps out keys for values at one specific position in your input file. Lowkey magical. ✨

The dictionary file's name gets handed over on the command line with the option dictfile. That file is just a plain lil text file laid out in two columns:

  • column one = the keys πŸ”‘
  • column two = the respective values πŸ’Ž

fr fr, the values can absolutely be equal to each other, no drama there β€” but the keys should all be different. That part matters, bestie.

Data comes in from standard input, and every single field sitting at position pos gets treated as a key from the dictionary you gave it, then replaced with the value that goes with it. If pos isn't specified, it just assumes it's 1. No cap.

Now, if pos is larger than the number of fields, then nothing gets replaced β€” no replacement takes place, that's it, that's the tea. πŸ™ˆ

And if the option force is not set, then only those fields that actually show up as keys in the dictionary file get replaced. Periodt.


πŸ’… OPTIONS πŸ’…

  • -d β€” name of the dictionary file
  • -c β€” position of the column of keys to be replaced
  • -f β€” forced look-up: substitute provided string for non defined keys

⭐ EXAMPLES ⭐

gbconvtable -d dict_file -c 3 -f 'none' < input_file

This program requires awk or gawk. Not me forgetting to mention that β€” it's literally right here. πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Written by Giulio Bottazzi


🌈 REPORTING BUGS 🌈

Report bugs to <gbutils@googlegroups.com>

Package home page: <http://cafim.sssup.it/~giulio/software/gbutils/index.html>


Copyright Β© 2010-2015 Giulio Bottazzi

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

okay this is the serious part so listen up: no warranty, none, zero, nada. it's giving "you're on your own" but like, legally and affectionately πŸ’€

that's the whole page, you ate that 🫢 β€” gbconvtable ver. 5.6, August 2017, and that's the source + date sign-off, bye bestie πŸ§šπŸ’œ