File: 5.txt

package info (click to toggle)
clog 1.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 680 kB
  • sloc: cpp: 8,670; makefile: 10
file content (33 lines) | stat: -rw-r--r-- 1,350 bytes parent folder | download | duplicates (3)
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
33
So far, the rules have all involved text string matches.  Clog also supports
regular expressions, with a slightly different syntax:

$ rm ~/.clogrc
$ echo 'default rule /[Ww]ho/ --> red match' >> ~/.clogrc
$ echo 'default rule /n...t/ --> blue match' >> ~/.clogrc

This rules color 'Who' or 'who' red, and the word 'night' (or anything matching
'n...t') blue.

$ clog < hamlet
FRANCISCO at his post. Enter to him BERNARDO
BERNARDO Whos there?
FRANCISCO Nay, answer me: stand, and unfold yourself.
BERNARDO Long live the king.
FRANCISCO Bernardo?
BERNARDO He.
FRANCISCO You come most carefully upon your hour.
BERNARDO Tis now struck twelve, get thee to bed, Francisco.
FRANCISCO For this relief much thanks: tis bitter cold, And I am sick at heart.
BERNARDO Have you had quiet guard?
FRANCISCO Not a mouse stirring.
BERNARDO Well, good night.  If you do meet Horatio and Marcellus, The rivals of my watch, bid them make haste.
FRANCISCO I think I hear them. Stand, ho. Whos there?
HORATIO Friends to this ground.
MARCELLUS And liegemen to the Dane.
FRANCISCO Give you good night.
MARCELLUS O, farewell, honest soldier: Who hath relieved you?
FRANCISCO Bernardo has my place.  Give you good night.
MARCELLUS Holla. Bernardo.
BERNARDO Say, What, is Horatio there?
HORATIO A piece of him.