GRCAT(1)
π NAME π
grcat β bestie, it reads from standard input, colourises it, and writes it straight to standard output. that's the whole vibe. β¨
πΈ SYNOPSIS πΈ
grcat configuration
π¦ DESCRIPTION π¦
okay so configuration is the name of a configuration file. the program goes hunting for it in these directories, in exactly this order:
~/.grc//usr/local/share/grc//usr/share/grc/
if it doesn't find the file in any of those, it just assumes what you typed is an absolute path of a configuration file located elsewhere. no cap. π«Ά
so the configuration file is made of entries, one per regexp, and entries are separated with lines whose first character is non-alphanumeric (except #). lines beginning with # and empty lines get ignored. periodt. π
each entry is several lines. each line has the form:
keyword=value
where keyword is one of: regexp, colours, command, concat, skip, count. only regexp is mandatory, but ngl it does not have much sense by itself unless you specify at least a colour or command keyword as well.
regexpβ the regular expression to match. the main character of the whole operation. πcoloursβ the list of colours, separated by commas (you can specify only one colour), each colour per one regexp group specified inregexp.commandβ the command to be executed whenregexpmatches. its output will be mixed with normal stdout, so use redirectors (>/dev/null) if you want to supress it.replaceβ means the regular expression match will be replaced by the value. all the preceeding regular expressions will be evaluated against the original text, all the following regular expressions will be evaluated against the replaced text.skipβ can be eitheryes, orno. ifyes, the matched line will be skipped and not displayed in output. default isno.countβ one of the words:once,more, orstop.oncemeans that if the regexp is matched, its first occurrence is coloured and the program will continue with other regexp's.moremeans that if there are multiple matches of the regexp in one line, all of them will be coloured.stopmeans that the regexp will be coloured and program will move to the next line (i.e. ignoring other regexp's).
regular expressions are evaluated from top to bottom, and honestly that's the slay part β it's what lets you do nested and overlapped expressions. (e.g. you colour everything inside parentheses with one colour, and if a following expression matches the text inside parentheses, it will be also coloured) π
β¨ OPTIONS β¨
- None so far. π (genuinely nothing to tune here, it's giving minimalism)
π SEE ALSO π
π AUTHOR π
Written by Radovan GarabΓk <garabik @ kassiopeia.juls.savba.sk>
and that's the whole page bestie π this was GRCAT(1), living in the General Commands Manual β section 1, icon behaviour only. go colourise something. ππ¦π
π¦ where this page comes from
- arch rolling: grc 1.13-3 Β· GPL
- debian bookworm: grc 1.13.1-1
- debian trixie: grc 1.13.1-1
- fedora 43: grc 1.13-10.fc43 Β· GPL-2.0-only
- fedora 44: grc 1.13-11.fc44 Β· GPL-2.0-only
- nixpkgs unstable: grc 1.13
- opensuse-leap 16.0: grc 1.13-bp160.1.9 Β· GPL-2.0-or-later
- ubuntu jammy: grc 1.13.1-1
- ubuntu noble: grc 1.13.1-1
- ubuntu resolute: grc 1.13.1-1build1
- ubuntu stonking: grc 1.13.1-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms