diff options
-rw-r--r-- | config_files/hl | 111 | ||||
-rw-r--r-- | config_files/hl_1.20 | 688 | ||||
-rw-r--r-- | config_files/hl_1.21 | 787 |
3 files changed, 1580 insertions, 6 deletions
diff --git a/config_files/hl b/config_files/hl index 469f7ae..21e13b5 100644 --- a/config_files/hl +++ b/config_files/hl @@ -2,9 +2,9 @@ # Default configuration file for the "hl" command # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl.default Version 1.20 du 15/11/03 - +# @(#) [MB] cr_hl.default Version 1.22 du 16/08/21 - # -# /etc/default/hl version 1.20 +# /etc/default/hl version 1.22 # # ============================== COMMANDS ============================== @@ -22,6 +22,11 @@ cal : -c 'Su|Mo|Tu|We|Th|Fr|Sa' -b '[0-9]' +chkconfig : + -ei + -3r '.+\<on\>' + -1g '.+\<off\>' + # Red : 95% => 100% # Yellow : 80% => 94% # Cyan : 0% => 49% @@ -39,8 +44,8 @@ diff : -y '^<.*' -g '^>.*' -c '^([0-9]+(,[0-9]+)?[a-z][0-9]+(,[0-9]+)?)' - -2B '^diff -r .+' - -2b 'Only in' + -2B '^diff -r .+' + -2b 'Only in' -c '^Only in ([^:]+):' -3w '^Only in [^:]+: (.+)' @@ -51,6 +56,26 @@ dpkg-query : -c '^(Version|Size):.*' -y '^Section:.*' +dmidecode : + -e + -1B '^#.*' + -3g '^Handle .+' + -2B '^[^ ].+' + -3b 'Manufacturer:' + -3y 'Manufacturer: *(.+)' + -3b 'Product Name:' + -3y 'Product Name: *(.+)' + -3b 'Version:' + -3y 'Version: *(.+)' + -3b '.*Type:' + -3y 'Type: *(.+)' + -3b 'Family:' + -3y 'Family: *(.+)' + -3b 'Vendor:' + -3y 'Vendor: *(.+)' + -3b 'Serial Number:' + -3y 'Serial Number: *(.+)' + ethtool : -ei -r 'duplex:.*half|link detected:.*no|speed:.*100?Mb/s' @@ -147,6 +172,18 @@ man : -w '\<white\>' -3b '(Example .*):' +mpg123 : + -e + -%1c '^High Performance MPEG' + -. '^$' + -1c '^Playing MPEG.*' + -2b '^(MPEG .*)' + -2b '\<((Title|Artist|Comment|Year|Album|Genre):)' + -3c '^Title: *(.*)' + -2y '^Artist: *(.*)' + -2c '.*Decoding of [0-9]+ (.*) finished' + -3g '^\[([0-9:]+)\] Decoding of .* finished' + namei : -e -3c '.* -> .*' @@ -164,17 +201,74 @@ netstat : -b '\<((127\.[01]\.[01]\.[01])|(0\.0\.0\.0))\>' -r '\<(([0-9]{1,3}\.){3}[0-9]{1,3})\>' +objdump : + -e + -3y 'Disassembly of section.*' + -3g '^[[:xdigit:]]{16} .*' + -1m '\<(je|jne|jbe|jb)\>' + -2c '\<[[:xdigit:]]{2} ' + -2b '^ *\<[[:xdigit:]]+:' + # Alias for ps_cpu_time : ps : --ps_cpu_time -strace : - -e +smartctl : + -ei + -b '^==.+|^ID.+|^Num.+' + -g '(Raw_Read_Error_Rate|Current_Pending_Sector|Offline_Uncorrectable|UDMA_CRC_Error_Count).+ (0) *$' + -r '(Raw_Read_Error_Rate|Current_Pending_Sector|Offline_Uncorrectable|UDMA_CRC_Error_Count).+ ([1-9][0-9]*) *$' + -c '(Start_Stop_Count|Power_On_Hours|Power_Cycle_Count|Power-Off_Retract_Count|Spin_Up_Time).+ ([1-9][0-9]*) *$' + -y '(Reallocated_Event_Count|Multi_Zone_Error_Rate).+ ([1-9][0-9]*) *$' + -c '(Reallocated_Event_Count|Multi_Zone_Error_Rate).+ (0) *$' + +strace : + -e -3c '\<(open|close)\>' -2y '\<(read)\>' -3r '\<(write)\>' -3g '^open\("([^"]+)"' +stty : + -e + -2b ';' + -2b '(speed *) *[0-9]+ *(baud)' + -3c 'speed ([0-9]+) baud;' + -2b '(rows|columns)[^;]+(;)' + -3c 'rows ([0-9]+);' + -3c 'columns ([0-9]+);' + -3c 'line = ([0-9]+)' + -2b '\<((line|intr|quit|erase|kill|eof|eol|eol2|swtch)\> *=)' + -2b '\<((start|stop|susp|rprnt|werase|lnext|flush|min|time)\> *=)' + -3c '\<intr = ([^;]+)' + -3c '\<quit = ([^;]+)' + -3c '\<erase = ([^;]+)' + -3c '\<kill = ([^;]+)' + -3c '\<eof = ([^;]+)' + -3c '\<eol = ([^;]+)' + -3c '\<eol2 = ([^;]+)' + -3c '\<swtch = ([^;]+)' + -3c '\<start = ([^;]+)' + -3c '\<stop = ([^;]+)' + -3c '\<susp = ([^;]+)' + -3c '\<rprnt = ([^;]+)' + -3c '\<werase = ([^;]+)' + -3c '\<lnext = ([^;]+)' + -3c '\<flush = ([^;]+)' + -3c '\<min = ([^;]+)' + -3c '\<max = ([^;]+)' + -3c '\<time = ([^;]+)' + -2g '(^| )(parenb|parodd|cs8|hupcl|cstopb|cread|clocal|crtscts|ignbrk)\>' + -2g '(^| )(brkint|ignpar|parmrk|inpck|istrip|inlcr|igncr|icrnl|ixon|ixoff)\>' + -2g '(^| )(|iuclc|ixany|imaxbel|iutf8|opost|olcuc|ocrnl|onlcr|onocr|onlret)\>' + -2g '(^| )(ofill|ofdel|nl0|cr0|tab0|bs0|vt0|ff0|isig|icanon|iexten|echo)\>' + -2g '(^| )(echoe|echok|echonl|noflsh|xcase|tostop|echoprt|echoctl|echoke)\>' + -2r '(-(parenb|parodd|cs8|hupcl|cstopb|cread|clocal|crtscts|ignbrk)\>)' + -2r '(-(brkint|ignpar|parmrk|inpck|istrip|inlcr|igncr|icrnl|ixon|ixoff)\>)' + -2r '(-(|iuclc|ixany|imaxbel|iutf8|opost|olcuc|ocrnl|onlcr|onocr|onlret)\>)' + -2r '(-(ofill|ofdel|nl0|cr0|tab0|bs0|vt0|ff0|isig|icanon|iexten|echo)\>)' + -2r '(-(echoe|echok|echonl|noflsh|xcase|tostop|echoprt|echoctl|echoke)\>)' + tcpdump : -e -u @@ -479,6 +573,11 @@ MAC : -ei -3B '(([0-9a-f]{2}:){5}[0-9a-f]{2})' +on-off : + -ei + -3c '\<on\>' + -3y '\<off\>' + passwd : -e -c '^[^:]+' diff --git a/config_files/hl_1.20 b/config_files/hl_1.20 new file mode 100644 index 0000000..469f7ae --- /dev/null +++ b/config_files/hl_1.20 @@ -0,0 +1,688 @@ +# +# Default configuration file for the "hl" command +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl.default Version 1.20 du 15/11/03 - +# +# /etc/default/hl version 1.20 +# + +# ============================== COMMANDS ============================== +apt-get : + -ei + -r 'systemd|breaks?|.*\<unmet\>.*|.*\<unable\>.*' + -y '.*is not going.*' + -c '.*is to be .*' + -g '.*is already the newest.*' + +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]+)?)' + -2B '^diff -r .+' + -2b 'Only in' + -c '^Only in ([^:]+):' + -3w '^Only in [^:]+: (.+)' + +dpkg-query : + -e + -b '^(Package|Essential|Priority|Section|Installed-Size|Maintainer|Architecture|Version|Depends|Pre-Depends|Filename|Size|MD5sum|Description|Homepage|Description-md5|Tag|SHA1|SHA256):' + -g '^Package:.*' + -c '^(Version|Size):.*' + -y '^Section:.*' + +ethtool : + -ei + -r 'duplex:.*half|link detected:.*no|speed:.*100?Mb/s' + -g 'duplex:.*full|link detected:.*yes|speed:.*1000mb/s' + +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]*)' + +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 .*' + +man : + -e + -2G '^([A-Z][A-Z0-9]*\([1-8]\)) +.* +([A-Z][A-Z0-9]*\([1-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})\>' + +# Alias for ps_cpu_time : +ps : + --ps_cpu_time + +strace : + -e + -3c '\<(open|close)\>' + -2y '\<(read)\>' + -3r '\<(write)\>' + -3g '^open\("([^"]+)"' + +tcpdump : + -e + -u + -3 + -g '^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)\.' + -r '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+([^ ]+)\.' + -2 + -y '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+\.([^ .]+)' + -y '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+\.([^ :]+)' + +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:]]' + +# =========================== OTHER CONFIGS ============================ +acl : + -e + -b '#.*' + -g '(user|group|other)::' + -r '.w.' + -y '[-rwx]{3}' + +# Just for fun : C syntax, close to vim's +C : + -e + -%c '/\*' + -. '\*/' + -g '\<(void|bool|char|int|long|unsigned|float|double|struct|enum)\>' + -y '\<(sizeof|switch|case|default|for|while|if|else|[0-9]|stderr|stdout)\>' + -m '(\\n|\\r|\\b)' + -y '".*"' + -m '^[ ]*#[a-zA-Z]+' + -y '^[ ]*#include[ ]+(<.*>|".*")' + +colors : + -1r 'Color01' + -2r 'Color02' + -3r 'Color03' + -1g 'Color04' + -2g 'Color05' + -3g 'Color06' + -1y 'Color07' + -2y 'Color08' + -3y 'Color09' + -1b 'Color10' + -2b 'Color11' + -3b 'Color12' + -1m 'Color13' + -2m 'Color14' + -3m 'Color15' + -1c 'Color16' + -2c 'Color17' + -3c 'Color18' + -1w 'Color19' + -2w 'Color20' + -3w 'Color21' + -1R 'Color22' + -2R 'Color23' + -3R 'Color24' + -1G 'Color25' + -2G 'Color26' + -3G 'Color27' + -1Y 'Color28' + -2Y 'Color29' + -3Y 'Color30' + -1B 'Color31' + -2B 'Color32' + -3B 'Color33' + -1M 'Color34' + -2M 'Color35' + -3M 'Color36' + -1C 'Color37' + -2C 'Color38' + -3C 'Color39' + -1W 'Color40' + -2W 'Color41' + -3W 'Color42' + +colors42 : + -1 + -r 'Color01' + -g 'Color04' + -y 'Color07' + -b 'Color10' + -m 'Color13' + -c 'Color16' + -w 'Color19' + -2 + -r 'Color02' + -g 'Color05' + -y 'Color08' + -b 'Color11' + -m 'Color14' + -c 'Color17' + -w 'Color20' + -3 + -r 'Color03' + -g 'Color06' + -y 'Color09' + -b 'Color12' + -m 'Color15' + -c 'Color18' + -w 'Color21' + -1 + -R 'Color22' + -G 'Color25' + -Y 'Color28' + -B 'Color31' + -M 'Color34' + -C 'Color37' + -W 'Color40' + -2 + -R 'Color23' + -G 'Color26' + -Y 'Color29' + -B 'Color32' + -M 'Color35' + -C 'Color38' + -W 'Color41' + -3 + -R 'Color24' + -G 'Color27' + -Y 'Color30' + -B 'Color33' + -M 'Color36' + -C 'Color39' + -W 'Color42' + +color_names : + -r '\<red\>' + -g '\<green\>' + -y '\<yellow\>' + -b '\<blue\>' + -m '\<magenta\>' + -c '\<cyan\>' + -w '\<white\>' + +err : + -ei + -r '.*error.*' + -y '(.*(warn|remark).*)' +# -c '[[:alpha:]][[:alnum:]]]?_[[:alnum:]]+\.[cly]' +# -m '[[:alpha:]][[:alnum:]]]?_[[:alnum:]]+\.o' +# -b '^----- .*|^ {8}.*' + +eth : + -e + -3Y 'eth[0-9][^ ]*' + +eth_VIP : + -e + -3 + -%c '(eth[0-9]+(\.[0-9]+){0,1}:[0-9]+)' + -. '^$' + +fail2ban : + -e + -c '.* Unban.*' + -r '.* Ban.*' + +ha_log : + -ei + -b 'Mar 16 12:[0-9]{2}:[0-9]{2}' + -r 'down|error|disabled?|stop(ped)?' + -g 'success' + -y 'warn(ing)?|standby' + -c 'eth0(:[0-9])?' + +heartbeat : + -ei + -r '(stop(|ped)|error|fail\>|failed|dead|disabled?|\<down|\<no\>)' + -g '(success|running|start(ed|ing)?|OK|yes|shutdown complete)' + -y 'warn' + -W '(eth[0-9](\.[0-9]+)?(:[0-9]+))' + -b 'info' + +hl : + -ei + -2B '^hl: version.*' + -1g 'Usage' + -2 + -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.*' + -w '(\(reverse video\))' + -r '.*\<red\>.*' + -g '.*\<green\>.*' + -y '.*\<yellow\>.*' + -b '.*\<blue\>.*' + -m '.*\<magenta\>.*' + -c '.*\<cyan\>.*' + -w '.*\<white\>.*' + +hl_conf : + -e + -2b '^#.*' + -3c '^([a-zA-Z_][-a-zA-Z_0-9]*)[ ]*:' + -3C '^[ ]+(--[a-zA-Z_][-a-zA-Z_0-9]*)\>' + -2w '^[ ]+-[1234%]*[rgybmcwRGYBMCWeiEDd]*' + -1r '^[ ]+-%?1r[ ]+(.*)' + -1g '^[ ]+-%?1g[ ]+(.*)' + -1y '^[ ]+-%?1y[ ]+(.*)' + -1b '^[ ]+-%?1b[ ]+(.*)' + -1m '^[ ]+-%?1m[ ]+(.*)' + -1c '^[ ]+-%?1c[ ]+(.*)' + -1w '^[ ]+-%?1w[ ]+(.*)' + -2r '^[ ]+-%?2?r[ ]+(.*)' + -2g '^[ ]+-%?2?g[ ]+(.*)' + -2y '^[ ]+-%?2?y[ ]+(.*)' + -2b '^[ ]+-%?2?b[ ]+(.*)' + -2m '^[ ]+-%?2?m[ ]+(.*)' + -2c '^[ ]+-%?2?c[ ]+(.*)' + -2w '^[ ]+-%?2?w[ ]+(.*)' + -3r '^[ ]+-%?3r[ ]+(.*)' + -3g '^[ ]+-%?3g[ ]+(.*)' + -3y '^[ ]+-%?3y[ ]+(.*)' + -3b '^[ ]+-%?3b[ ]+(.*)' + -3m '^[ ]+-%?3m[ ]+(.*)' + -3c '^[ ]+-%?3c[ ]+(.*)' + -3w '^[ ]+-%?3w[ ]+(.*)' + -1R '^[ ]+-%?1R[ ]+(.*)' + -1G '^[ ]+-%?1G[ ]+(.*)' + -1Y '^[ ]+-%?1Y[ ]+(.*)' + -1B '^[ ]+-%?1B[ ]+(.*)' + -1M '^[ ]+-%?1M[ ]+(.*)' + -1C '^[ ]+-%?1C[ ]+(.*)' + -1W '^[ ]+-%?1W[ ]+(.*)' + -2R '^[ ]+-%?2?R[ ]+(.*)' + -2G '^[ ]+-%?2?G[ ]+(.*)' + -2Y '^[ ]+-%?2?Y[ ]+(.*)' + -2B '^[ ]+-%?2?B[ ]+(.*)' + -2M '^[ ]+-%?2?M[ ]+(.*)' + -2C '^[ ]+-%?2?C[ ]+(.*)' + -2W '^[ ]+-%?2?W[ ]+(.*)' + -3R '^[ ]+-%?3R[ ]+(.*)' + -3G '^[ ]+-%?3G[ ]+(.*)' + -3Y '^[ ]+-%?3Y[ ]+(.*)' + -3B '^[ ]+-%?3B[ ]+(.*)' + -3M '^[ ]+-%?3M[ ]+(.*)' + -3C '^[ ]+-%?3C[ ]+(.*)' + -3W '^[ ]+-%?3W[ ]+(.*)' + -1C ' +$' + -1B ' +$' + +hl_usage : + -ei + -r '(-r .*)' + -g '(-g .*)' + -y '(-y .*)' + -b '(-b .*)' + -m '(-m .*)' + -c '(-c .*)' + -w '(-w .*)' + +hosts : + -e + -b '#.*' + -1R '^([ ]+)[0-9.]' + -2g '^[ ]*\<((([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]))\>' + -3r '(([0-9]{1,3}\.){3}[0-9]{1,3})' + -3c '^[ ]*[0-9.]+[ ]+([^ ]+)' + -2y '^[ ]*[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]))\>' + +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})' + +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] .*)' + +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 '(\$([a-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' + +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' + +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 '.+' diff --git a/config_files/hl_1.21 b/config_files/hl_1.21 new file mode 100644 index 0000000..153c28d --- /dev/null +++ b/config_files/hl_1.21 @@ -0,0 +1,787 @@ +# +# Default configuration file for the "hl" command +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl.default Version 1.21 du 16/08/21 - +# +# /etc/default/hl version 1.21 +# + +# ============================== COMMANDS ============================== +apt-get : + -ei + -r 'systemd|breaks?|.*\<unmet\>.*|.*\<unable\>.*' + -y '.*is not going.*' + -c '.*is to be .*' + -g '.*is already the newest.*' + +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]' + +chkconfig : + -ei + -3r '.+\<on\>' + -1g '.+\<off\>' + +# 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]+)?)' + -2B '^diff -r .+' + -2b 'Only in' + -c '^Only in ([^:]+):' + -3w '^Only in [^:]+: (.+)' + +dpkg-query : + -e + -b '^(Package|Essential|Priority|Section|Installed-Size|Maintainer|Architecture|Version|Depends|Pre-Depends|Filename|Size|MD5sum|Description|Homepage|Description-md5|Tag|SHA1|SHA256):' + -g '^Package:.*' + -c '^(Version|Size):.*' + -y '^Section:.*' + +dmidecode : + -e + -1B '^#.*' + -3g '^Handle .+' + -2B '^[^ ].+' + -3b 'Manufacturer:' + -3y 'Manufacturer: *(.+)' + -3b 'Product Name:' + -3y 'Product Name: *(.+)' + -3b 'Version:' + -3y 'Version: *(.+)' + -3b '.*Type:' + -3y 'Type: *(.+)' + -3b 'Family:' + -3y 'Family: *(.+)' + -3b 'Vendor:' + -3y 'Vendor: *(.+)' + -3b 'Serial Number:' + -3y 'Serial Number: *(.+)' + +ethtool : + -ei + -r 'duplex:.*half|link detected:.*no|speed:.*100?Mb/s' + -g 'duplex:.*full|link detected:.*yes|speed:.*1000mb/s' + +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]*)' + +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 .*' + +man : + -e + -2G '^([A-Z][A-Z0-9]*\([1-8]\)) +.* +([A-Z][A-Z0-9]*\([1-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 .*):' + +mpg123 : + -e + -%1c '^High Performance MPEG' + -. '^$' + -1c '^Playing MPEG.*' + -2b '^(MPEG .*)' + -2b '\<((Title|Artist|Comment|Year|Album|Genre):)' + -3c '^Title: *(.*)' + -2y '^Artist: *(.*)' + -2c '.*Decoding of [0-9]+ (.*) finished' + -3g '^\[([0-9:]+)\] Decoding of .* finished' + +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})\>' + +objdump : + -e + -3y 'Disassembly of section.*' + -3g '^[[:xdigit:]]{16} .*' + -1m '\<(je|jne|jbe|jb)\>' + -2c '\<[[:xdigit:]]{2} ' + -2b '^ *\<[[:xdigit:]]+:' + +# Alias for ps_cpu_time : +ps : + --ps_cpu_time + +smartctl : + -ei + -b '^==.+|^ID.+|^Num.+' + -g '(Raw_Read_Error_Rate|Current_Pending_Sector|Offline_Uncorrectable|UDMA_CRC_Error_Count).+ (0) *$' + -r '(Raw_Read_Error_Rate|Current_Pending_Sector|Offline_Uncorrectable|UDMA_CRC_Error_Count).+ ([1-9][0-9]*) *$' + -c '(Start_Stop_Count|Power_On_Hours|Power_Cycle_Count|Power-Off_Retract_Count|Spin_Up_Time).+ ([1-9][0-9]*) *$' + -y '(Reallocated_Event_Count|Multi_Zone_Error_Rate).+ ([1-9][0-9]*) *$' + -c '(Reallocated_Event_Count|Multi_Zone_Error_Rate).+ (0) *$' + +strace : + -e + -3c '\<(open|close)\>' + -2y '\<(read)\>' + -3r '\<(write)\>' + -3g '^open\("([^"]+)"' + +stty : + -e + -2b ';' + -2b '(speed *) *[0-9]+ *(baud)' + -3c 'speed ([0-9]+) baud;' + -2b '(rows|columns)[^;]+(;)' + -3c 'rows ([0-9]+);' + -3c 'columns ([0-9]+);' + -3c 'line = ([0-9]+)' + -2b '\<((line|intr|quit|erase|kill|eof|eol|eol2|swtch)\> *=)' + -2b '\<((start|stop|susp|rprnt|werase|lnext|flush|min|time)\> *=)' + -3c '\<intr = ([^;]+)' + -3c '\<quit = ([^;]+)' + -3c '\<erase = ([^;]+)' + -3c '\<kill = ([^;]+)' + -3c '\<eof = ([^;]+)' + -3c '\<eol = ([^;]+)' + -3c '\<eol2 = ([^;]+)' + -3c '\<swtch = ([^;]+)' + -3c '\<start = ([^;]+)' + -3c '\<stop = ([^;]+)' + -3c '\<susp = ([^;]+)' + -3c '\<rprnt = ([^;]+)' + -3c '\<werase = ([^;]+)' + -3c '\<lnext = ([^;]+)' + -3c '\<flush = ([^;]+)' + -3c '\<min = ([^;]+)' + -3c '\<max = ([^;]+)' + -3c '\<time = ([^;]+)' + -2g '(^| )(parenb|parodd|cs8|hupcl|cstopb|cread|clocal|crtscts|ignbrk)\>' + -2g '(^| )(brkint|ignpar|parmrk|inpck|istrip|inlcr|igncr|icrnl|ixon|ixoff)\>' + -2g '(^| )(|iuclc|ixany|imaxbel|iutf8|opost|olcuc|ocrnl|onlcr|onocr|onlret)\>' + -2g '(^| )(ofill|ofdel|nl0|cr0|tab0|bs0|vt0|ff0|isig|icanon|iexten|echo)\>' + -2g '(^| )(echoe|echok|echonl|noflsh|xcase|tostop|echoprt|echoctl|echoke)\>' + -2r '(-(parenb|parodd|cs8|hupcl|cstopb|cread|clocal|crtscts|ignbrk)\>)' + -2r '(-(brkint|ignpar|parmrk|inpck|istrip|inlcr|igncr|icrnl|ixon|ixoff)\>)' + -2r '(-(|iuclc|ixany|imaxbel|iutf8|opost|olcuc|ocrnl|onlcr|onocr|onlret)\>)' + -2r '(-(ofill|ofdel|nl0|cr0|tab0|bs0|vt0|ff0|isig|icanon|iexten|echo)\>)' + -2r '(-(echoe|echok|echonl|noflsh|xcase|tostop|echoprt|echoctl|echoke)\>)' + +tcpdump : + -e + -u + -3 + -g '^[^ ]+[ ]+[^ ]+[ ]+([^ ]+)\.' + -r '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+([^ ]+)\.' + -2 + -y '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+\.([^ .]+)' + -y '^[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+[ ]+[^ ]+\.([^ :]+)' + +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:]]' + +# =========================== OTHER CONFIGS ============================ +acl : + -e + -b '#.*' + -g '(user|group|other)::' + -r '.w.' + -y '[-rwx]{3}' + +# Just for fun : C syntax, close to vim's +C : + -e + -%c '/\*' + -. '\*/' + -g '\<(void|bool|char|int|long|unsigned|float|double|struct|enum)\>' + -y '\<(sizeof|switch|case|default|for|while|if|else|[0-9]|stderr|stdout)\>' + -m '(\\n|\\r|\\b)' + -y '".*"' + -m '^[ ]*#[a-zA-Z]+' + -y '^[ ]*#include[ ]+(<.*>|".*")' + +colors : + -1r 'Color01' + -2r 'Color02' + -3r 'Color03' + -1g 'Color04' + -2g 'Color05' + -3g 'Color06' + -1y 'Color07' + -2y 'Color08' + -3y 'Color09' + -1b 'Color10' + -2b 'Color11' + -3b 'Color12' + -1m 'Color13' + -2m 'Color14' + -3m 'Color15' + -1c 'Color16' + -2c 'Color17' + -3c 'Color18' + -1w 'Color19' + -2w 'Color20' + -3w 'Color21' + -1R 'Color22' + -2R 'Color23' + -3R 'Color24' + -1G 'Color25' + -2G 'Color26' + -3G 'Color27' + -1Y 'Color28' + -2Y 'Color29' + -3Y 'Color30' + -1B 'Color31' + -2B 'Color32' + -3B 'Color33' + -1M 'Color34' + -2M 'Color35' + -3M 'Color36' + -1C 'Color37' + -2C 'Color38' + -3C 'Color39' + -1W 'Color40' + -2W 'Color41' + -3W 'Color42' + +colors42 : + -1 + -r 'Color01' + -g 'Color04' + -y 'Color07' + -b 'Color10' + -m 'Color13' + -c 'Color16' + -w 'Color19' + -2 + -r 'Color02' + -g 'Color05' + -y 'Color08' + -b 'Color11' + -m 'Color14' + -c 'Color17' + -w 'Color20' + -3 + -r 'Color03' + -g 'Color06' + -y 'Color09' + -b 'Color12' + -m 'Color15' + -c 'Color18' + -w 'Color21' + -1 + -R 'Color22' + -G 'Color25' + -Y 'Color28' + -B 'Color31' + -M 'Color34' + -C 'Color37' + -W 'Color40' + -2 + -R 'Color23' + -G 'Color26' + -Y 'Color29' + -B 'Color32' + -M 'Color35' + -C 'Color38' + -W 'Color41' + -3 + -R 'Color24' + -G 'Color27' + -Y 'Color30' + -B 'Color33' + -M 'Color36' + -C 'Color39' + -W 'Color42' + +color_names : + -r '\<red\>' + -g '\<green\>' + -y '\<yellow\>' + -b '\<blue\>' + -m '\<magenta\>' + -c '\<cyan\>' + -w '\<white\>' + +err : + -ei + -r '.*error.*' + -y '(.*(warn|remark).*)' +# -c '[[:alpha:]][[:alnum:]]]?_[[:alnum:]]+\.[cly]' +# -m '[[:alpha:]][[:alnum:]]]?_[[:alnum:]]+\.o' +# -b '^----- .*|^ {8}.*' + +eth : + -e + -3Y 'eth[0-9][^ ]*' + +eth_VIP : + -e + -3 + -%c '(eth[0-9]+(\.[0-9]+){0,1}:[0-9]+)' + -. '^$' + +fail2ban : + -e + -c '.* Unban.*' + -r '.* Ban.*' + +ha_log : + -ei + -b 'Mar 16 12:[0-9]{2}:[0-9]{2}' + -r 'down|error|disabled?|stop(ped)?' + -g 'success' + -y 'warn(ing)?|standby' + -c 'eth0(:[0-9])?' + +heartbeat : + -ei + -r '(stop(|ped)|error|fail\>|failed|dead|disabled?|\<down|\<no\>)' + -g '(success|running|start(ed|ing)?|OK|yes|shutdown complete)' + -y 'warn' + -W '(eth[0-9](\.[0-9]+)?(:[0-9]+))' + -b 'info' + +hl : + -ei + -2B '^hl: version.*' + -1g 'Usage' + -2 + -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.*' + -w '(\(reverse video\))' + -r '.*\<red\>.*' + -g '.*\<green\>.*' + -y '.*\<yellow\>.*' + -b '.*\<blue\>.*' + -m '.*\<magenta\>.*' + -c '.*\<cyan\>.*' + -w '.*\<white\>.*' + +hl_conf : + -e + -2b '^#.*' + -3c '^([a-zA-Z_][-a-zA-Z_0-9]*)[ ]*:' + -3C '^[ ]+(--[a-zA-Z_][-a-zA-Z_0-9]*)\>' + -2w '^[ ]+-[1234%]*[rgybmcwRGYBMCWeiEDd]*' + -1r '^[ ]+-%?1r[ ]+(.*)' + -1g '^[ ]+-%?1g[ ]+(.*)' + -1y '^[ ]+-%?1y[ ]+(.*)' + -1b '^[ ]+-%?1b[ ]+(.*)' + -1m '^[ ]+-%?1m[ ]+(.*)' + -1c '^[ ]+-%?1c[ ]+(.*)' + -1w '^[ ]+-%?1w[ ]+(.*)' + -2r '^[ ]+-%?2?r[ ]+(.*)' + -2g '^[ ]+-%?2?g[ ]+(.*)' + -2y '^[ ]+-%?2?y[ ]+(.*)' + -2b '^[ ]+-%?2?b[ ]+(.*)' + -2m '^[ ]+-%?2?m[ ]+(.*)' + -2c '^[ ]+-%?2?c[ ]+(.*)' + -2w '^[ ]+-%?2?w[ ]+(.*)' + -3r '^[ ]+-%?3r[ ]+(.*)' + -3g '^[ ]+-%?3g[ ]+(.*)' + -3y '^[ ]+-%?3y[ ]+(.*)' + -3b '^[ ]+-%?3b[ ]+(.*)' + -3m '^[ ]+-%?3m[ ]+(.*)' + -3c '^[ ]+-%?3c[ ]+(.*)' + -3w '^[ ]+-%?3w[ ]+(.*)' + -1R '^[ ]+-%?1R[ ]+(.*)' + -1G '^[ ]+-%?1G[ ]+(.*)' + -1Y '^[ ]+-%?1Y[ ]+(.*)' + -1B '^[ ]+-%?1B[ ]+(.*)' + -1M '^[ ]+-%?1M[ ]+(.*)' + -1C '^[ ]+-%?1C[ ]+(.*)' + -1W '^[ ]+-%?1W[ ]+(.*)' + -2R '^[ ]+-%?2?R[ ]+(.*)' + -2G '^[ ]+-%?2?G[ ]+(.*)' + -2Y '^[ ]+-%?2?Y[ ]+(.*)' + -2B '^[ ]+-%?2?B[ ]+(.*)' + -2M '^[ ]+-%?2?M[ ]+(.*)' + -2C '^[ ]+-%?2?C[ ]+(.*)' + -2W '^[ ]+-%?2?W[ ]+(.*)' + -3R '^[ ]+-%?3R[ ]+(.*)' + -3G '^[ ]+-%?3G[ ]+(.*)' + -3Y '^[ ]+-%?3Y[ ]+(.*)' + -3B '^[ ]+-%?3B[ ]+(.*)' + -3M '^[ ]+-%?3M[ ]+(.*)' + -3C '^[ ]+-%?3C[ ]+(.*)' + -3W '^[ ]+-%?3W[ ]+(.*)' + -1C ' +$' + -1B ' +$' + +hl_usage : + -ei + -r '(-r .*)' + -g '(-g .*)' + -y '(-y .*)' + -b '(-b .*)' + -m '(-m .*)' + -c '(-c .*)' + -w '(-w .*)' + +hosts : + -e + -b '#.*' + -1R '^([ ]+)[0-9.]' + -2g '^[ ]*\<((([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]))\>' + -3r '(([0-9]{1,3}\.){3}[0-9]{1,3})' + -3c '^[ ]*[0-9.]+[ ]+([^ ]+)' + -2y '^[ ]*[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]))\>' + +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})' + +on-off : + -ei + -3c '\<on\>' + -3y '\<off\>' + +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] .*)' + +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 '(\$([a-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' + +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' + +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 '.+' |