1GRCAT(1) General Commands Manual GRCAT(1)
2
3
4
6 grcat - read from standard input, colourise it and write to standard
7 output
8
10 grcat configuration
11
13 configuration is a name of a configuration file. Directories ~/.grc/,
14 /usr/local/share/grc/, /usr/share/grc/ are searched for the file (in
15 this order).
16
17 If the file is not found, it is assumed to be an absolute path of a
18 configuration file located elsewhere.
19
20 Configuration file consists of entries, one per regexp, entries are
21 separated with lines with first character non-alphanumeric (except #).
22 Lines beginning with # or empty lines are ignored.
23
24 Each entry consists of several lines. Each line has form: key‐
25 word=value where keyword is one of: regexp, colours, command, concat,
26 skip, count. Only regexp is mandatory, but it does not have much sense
27 by itself unless you specify at least a colour or command keyword as
28 well.
29
30 regexp is the regular expression to match
31
32 colours is the list of colours, separated by commas (you can specify
33 only one colour), each colour per one regexp group specified in regexp.
34
35 command is command to be executed when regexp matches. Its output will
36 be mixed with normal stdout, use redirectors ( >/dev/null) if you want
37 to supress it.
38
39 replace means the regular expression match will be replaced by the
40 value, all the preceeding regular expressions will be evaluated against
41 the original text, all the following regular expressions will be evalu‐
42 ated against the replaced text
43
44 skip can be either yes, or no, if yes, the matched line will be skipped
45 and not displayed in output. Default is no.
46
47 count is one of words: once, more, or stop.
48
49 once means that if the regexp is matched, its first occurrence is
50 coloured and the program will continue with other regexp's.
51
52 more means that if there are multiple matches of the regexp in one
53 line, all of them will be coloured.
54
55 stop means that the regexp will be coloured and program will move to
56 the next line (i.e. ignoring other regexp's)
57
58 Regular expressions are evaluated from top to bottom, this allows
59 nested and overlapped expressions. (e.g. you colour everything inside
60 parentheses with one colour, and if a following expression matches the
61 text inside parentheses, it will be also coloured)
62
63
65 None so far.
66
68 grc(1)
69
71 Written by Radovan Garabík <garabik @ kassiopeia.juls.savba.sk>
72
73
74
75 GRCAT(1)