1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
The section name can be used to maintain several rule sets. Here is a new
example using two rule sets:
$ echo '# Shakespeare characters' >> ~/.clogrc
$ echo 'Shakespeare rule "FRANCISCO" --> red match' >> ~/.clogrc
$ echo 'Shakespeare rule "BERNARDO" --> blue match' >> ~/.clogrc
$ echo 'Shakespeare rule "MARCELLUS" --> green match' >> ~/.clogrc
$ echo 'Shakespeare rule "HORATIO" --> white match' >> ~/.clogrc
$
$ echo '# Syslog severities' >> ~/.clogrc
$ echo 'syslog rule /warn|debug/ --> yellow line' >> ~/.clogrc
$ echo 'syslog rule /error|severe/ --> red line' >> ~/.clogrc
$ echo 'syslog rule "critical" --> bold red line' >> ~/.clogrc
$ echo 'syslog rule "ignore" --> suppress' >> ~/.clogrc
Now we can invoke the default set from before, by not specifying a rule set:
$ clog < hamlet
...
Or we can select the Shakespeare set, by providing the rule set name as an
argument:
$ clog Shakespeare < hamlet
...
We can specify multiple rule set names if we wish, but these do not include
the default set:
$ clog Shakespeare syslog < hamlet
...
|