hl(5)

HL(5) File Formats and Conversions HL(5)

NAME

hl - Default configuration file for hl

DESCRIPTION

/etc/default/hl is the default configuration file for the hl command.

Since version 1.57, the default configuration for hl is /etc/default/hl . This configuration file is common to all users.
But each user can define his own configurations in his own $HOME/.hl.cfg configuration file. Users' configurations have the precedence over default configurations.

Their recognized syntax is :

- comment lines (beginning with a '#'),

- configuration definition (a name, eventually followed by spaces or tabs, and a ':'),

- configuration options for this configuration (a tab, followed by the options)

- an empty line acts as a separator between configurations

The format consists in a list of configuration definitions, each configuration consisting in :

- the configuration name at the beginning of the line, followed by a column

- a list of hl options with their optional argument.

A regular expression following a color option specifier MUST BE ENCLOSED IN SINGLE QUOTES.

Comments are allowed and begin with a '#' sign.

EXAMPLE

Example 1 :
hl -ei -c '([0-9a-f]{2}:){5}[0-9a-f]{2}'

This command colorizes a MAC address in cyan.

FILES

Since version 1.57, the default configuration for hl is /etc/default/hl . This configuration file is common to all users.
But each user can define his own configurations in his own $HOME/.hl.cfg configuration file. Users' configurations have the precedence over default configurations.

Their recognized syntax is :

- comment lines (beginning with a '#'),

- configuration definition (a name, eventually followed by spaces or tabs, and a ':'),

- configuration options for this configuration (a tab, followed by the options)

- an empty line acts as a separator between configurations

Example :

#
# Example of default configuration file
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cal            :

-e
-g '[1-9][0-9][0-9][0-9]'
-y 'January|February|March|April|May|June|July|August|September|October|November|December'
-c 'Su|Mo|Tu|We|Th|Fr|Sa'
-b '[0-9]' # Red : 95% => 100% # Yellow : 80% => 94% # Cyan : 0% => 49% # Green : 50% => 79% (everything else) df :
-e
-r '<((100|9[5-9])%.*)'
-y '<((8[0-9]|9[0-4])%.*)'
-c '<[0-4][0-9]?%.*'
-g '<[0-9]+%.*'
-b '^Filesystem.*' diff :
-e
-y '^<.*'
-g '^>.*'
-c '^([0-9]+(,[0-9]+)?[a-z][0-9]+(,[0-9]+)?)' fdisk :
-e
-b 'Device Boot.*'
-3w 'Disk.*(/dev/sd.)'
-2
-c '.*/dev/sda.*'
-%c 'Disk /dev/sda'
-. '^$'
-g '.*/dev/sdb.*'
-%g 'Disk /dev/sdb'
-. '^$'
-y '.*/dev/sdc.*'
-%y 'Disk /dev/sdc'
-. '^$'
-m '.*/dev/sdd.*'
-%m 'Disk /dev/sdd'
-. '^$'
-b '.*Device.*'
-1G '.*/dev/sde.*' free :
-e
-2
-R 'used'
-G 'free'
-b 'total.*'
-1C 'Swap|Mem'
-3r '^Swap: +[0-9]+ +([0-9]+)'
-3g '^Swap: +[0-9]+ +[0-9]+ +([0-9]+)'
-3m '^Mem: +[0-9]+ +([0-9]+)'
-1g '^Mem: +[0-9]+ +[0-9]+ +([0-9]+)'
-2B '^Mem: +([0-9]+)'
-2B '^Swap: +([0-9]+)' ifconfig :
-ei
-3G 'inet addr:([0-9]{1,3}(.[0-9]{1,3}){3})'
-2
-m '^((eth|(vir)?br|vnet)[0-9.]*:[0-9]+)>'
-b '^((eth|(vir)?br|vnet)[0-9.]*.[0-9]+)>'
-c '(([0-9a-f]{2}:){5}[0-9a-f]{2})'
-3g '<(UP>|<RUNNING)>'
-2g '(([0-9]{1,3}.){3}[0-9]{1,3}>)'
-2y '(^(eth|(vir)?br|vnet)[0-9.:]*)>'
-3m '[0-9a-f]{4}::[0-9a-f]{4}[0-9a-f]{4}:[0-9a-f]{4}:[0-9a-f]{4}'
-2r ' ((errors|dropped|overruns):[^0][0-9]*)' iostat :
-e
-b '^((Device|avg-cpu):.*)' # -g '^(sda.*)' # -y '^(sdb.*)'
-c ' (0.(0[1-9]|[1-9][0-9]))'
-3c ' ([1-9][.0-9]*)' IP :
--validate_IP ip :
-e
-3g '<((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))>' iptables :
-e
-G 'policy (ACCEPT)'
-R 'policy (DROP|REJECT)'
-3Y '<(INPUT|OUTPUT|FORWARD|POSTROUTING)>'
-3y '<(fail2ban[-a-z]+)>'
-2w '^Chain .+'
-2
-b '#.*'
-2b '^target>.*'
-g '.*ACCEPT.*'
-r '(.*(DROP|REJECT).*)'
-m 'iptables.*-F.*'
-w '^iptables .*' jigdo :
-e
-2b 'DVD_jigdo.list'
-2m '[^ ]*.tmp$'
-3b '[^ ]*.tmpdir$'
-3g '[^ ]*.iso$'
-2y '[^ ]*.jigdo$' ls_doc :
-e -r '^-rw........*'
-g '^-r-........*'
-m '^d..........*.*'
-y '.*:$' MAC :
-ei
-3B '(([0-9a-f]{2}:){5}[0-9a-f]{2})' man :
-e
-2G '^([A-Z][A-Z0-9]*-8]) +.* +([A-Z][A-Z0-9]*-8])$'
-2B '^[A-Z][A-Z ]*'
-3y '^[ ]+-[a-zA-Z0-9][ ]'
-R '(red).*reverse video'
-G '(green).*reverse video'
-Y '(yellow).*reverse video'
-B '(blue).*reverse video'
-M '(magenta).*reverse video'
-C '(cyan).*reverse video'
-W '(white).*reverse video'
-r 'red'
-g 'green'
-y 'yellow'
-b 'blue'
-m 'magenta'
-c 'cyan'
-w 'white'
-3b '(Example .*):' namei :
-e
-3c '.* -> .*'
-2b '^ *d .*'
-3g '^ *- .*'
-y '^f: .*'
-r '^( *? .*|.* No such file or directory.*)' netstat :
-ei
-g 'ESTABLISHED'
-1y 'LISTEN'
-m 'TIME_WAIT'
-g '<((192.168.[0-9]{1,3}.[0-9]{1,3}))>'
-b '<((127.[01].[01].[01])|(0.0.0.0))>'
-r '<(([0-9]{1,3}.){3}[0-9]{1,3})>' passwd :
-e
-c '^[^:]+'
-m '^[^:]+:([^:]+):'
-y '^[^:]+:[^:]+:([^:]+:[^:]+):'
-c '^([^:]*:){4}([^:]+)'
-g '^([^:]*:){5}([^:]+)'
-y '^([^:]*:){6}([^:]+)' passwd_chk :
-e
-G '^([^:]+):.*(/bin/false)$'
-R '^([^:]+).*:(/bin/bash)$'
--passwd percent :
-e
-r '<(100|9[5-9])%'
-y '<(8[0-9]|9[0-4])%'
-g '<[0-9]+%' ps_cpu :
-e
-r '((0[1-9]|[1-9][0-9]):[0-9]{2}:[0-9]{2} .*)'
-y '(00:(0[1-9]|[1-9][0-9]):[0-9]{2} .*)'
-g '00:00:[1-9][0-9] .*'
-c '00:00:0[1-9] .*'
-b '00:00:00 .*' ps_cpu_time :
-e
-3
-r '((0[1-9]|[1-9][0-9])(:[0-9]{2}){2} .*)'
-y '(00:(0[1-9]|[1-9][0-9]):[0-9]{2} .*)'
-c '(00:00:[1-9][0-9] .*)' # Alias for ps_cpu_time : ps :
--ps_cpu_time rev_color_names :
-R 'red'
-G 'green'
-Y 'yellow'
-B 'blue'
-M 'magenta'
-C 'cyan'
-W 'white' samba :
-e
-b '=|^[ ]*[;#].*'
-g '.*='
-y '=.*'
-m '[][]'
-c ' sep3 :
-e
-3r '([0-9]+)[0-9]{18}([ ]|$)'
-3m '([0-9]+)[0-9]{15}([ ]|$)'
-2c '([0-9]+)[0-9]{12}([ ]|$)'
-3y '([0-9]+)[0-9]{9}([ ]|$)'
-3g '([0-9]+)[0-9]{6}([ ]|$)'
-3c '([0-9]+)[0-9]{3}([ ]|$)'
-3b '[0-9]+([0-9]{3})([ ]|$)' services :
-e
-g '^ *+ ] .*' -m '^ *- ] .*' -r '^ * ] .*' sh :
-e
-b '^#.*'
-m '(-zA-Z_][a-zA-Z_0-9]*|[0-9]|[*@#]))'
-y '"[^"]*"'
-g '^(([a-zA-Z_][a-zA-Z_0-9]*)|[{}])'
-3c '(<(echo|for|do|done|while|shift|eval|set)>)'
-2
-%g '<do>'
-. '<done>' show_disks :
-e
-g ' 2[0-9]°C |Hitachi [^ ]*| 2000..*GB,|krypton|/dev/sd'
-y ' 3[0-9]°C |/dev/hd'
-r 'WDC [^ ]*|/dev/sdc'
-b 'TOSHIBA [^ ]*|--+'
-m ' 500..*GB,|/dev/sdd'
-c 'antares|styx|/dev/sda' tcpdump :
-e
-u
-3
-g '^[^ ]+[ ]+[^ ]+[ ]+([^ ]+).'
-r '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+([^ ]+).'
-2
-y '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+.([^ .]+)'
-y '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+.([^ :]+)' validate_IP :
-e
-g '<((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))>'
-r '(([0-9]{1,3}.){3}[0-9]{1,3})' virsh_list :
-e
-c '^ *Id.*|^--*'
-3
-g '.*running*'
-2
-m '.*shut off'
-y '.*paused' w :
-e
-b '.*load average.*|^USER.*'
-r '^root .*'
-c ' /bin/bash'
-y ' /usr/bin/python'
-g '.+' xxd :
-e
-r '(<0a)|(0a>)'
-b '^[^:]+'
-g '.{16}$'
-c '[[:xdigit:]]' zabbix_netstat :
-e
-2c '<(94.247.232.55|192.168.168.[23]|0.0.0.0)>:10050>'
-3r '<([0-9]{1,3}(.[0-9]{1,3}){3}):10050>'
-3g '<(10050)>.* ([^ ]+) *$' hi_red :
-e
-3
-r '.+' hi_green :
-e
-3
-g '.+' hi_yellow :
-e
-3
-y '.+' hi_blue :
-e
-3
-b '.+' hi_magenta :
-e
-3
-m '.+' hi_cyan :
-e
-3
-c '.+' hi_white :
-e
-3
-w '.+' dim_red :
-e
-1
-r '.+' dim_green :
-e
-1
-g '.+' dim_yellow :
-e
-1
-y '.+' dim_blue :
-e
-1
-b '.+' dim_magenta :
-e
-1
-m '.+' dim_cyan :
-e
-1
-c '.+' dim_white :
-e
-1
-w '.+' red :
-e
-2
-r '.+' green :
-e
-2
-g '.+' yellow :
-e
-2
-y '.+' blue :
-e
-2
-b '.+' magenta :
-e
-2
-m '.+' cyan :
-e
-2
-c '.+' white :
-e
-2
-w '.+'

MAN PAGE VERSION

The version of this man page is 1.9. It is compatible with hl version 1.57 and upper.

AUTHOR

The original version of this manual page was written by Martial Bornet <mbornet (.) pro (at) wanadoo (.) fr> for the GNU/Linux system.

The author also can be contacted with <man (.) flashnux (at) gmail (.) com>.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU GPL.

September 2015