diff options
author | mbornet-hl <mbornet.pro@wanadoo.fr> | 2015-10-01 09:49:18 +0200 |
---|---|---|
committer | mbornet-hl <mbornet.pro@wanadoo.fr> | 2015-10-01 09:49:18 +0200 |
commit | d30cc1b038ba54458e302df377aee5dcc28db1c8 (patch) | |
tree | ac91bb4c57a9f691541885bed9f297369ebf19c6 | |
parent | 2c6a0b03d4d1c6d05cb39f55e3d2181723a460e6 (diff) | |
download | hl-d30cc1b038ba54458e302df377aee5dcc28db1c8.zip hl-d30cc1b038ba54458e302df377aee5dcc28db1c8.tar.gz hl-d30cc1b038ba54458e302df377aee5dcc28db1c8.tar.bz2 |
Added hl_bin directory
-rwxr-xr-x | hl_bin/cal | 41 | ||||
-rwxr-xr-x | hl_bin/cm | 41 | ||||
-rwxr-xr-x | hl_bin/df | 41 | ||||
-rwxr-xr-x | hl_bin/diff | 41 | ||||
-rwxr-xr-x | hl_bin/dpkg-query | 41 | ||||
-rwxr-xr-x | hl_bin/ethtool | 41 | ||||
-rwxr-xr-x | hl_bin/fdisk | 41 | ||||
-rwxr-xr-x | hl_bin/free | 41 | ||||
-rwxr-xr-x | hl_bin/hl | 41 | ||||
-rwxr-xr-x | hl_bin/hl_generic | 41 | ||||
-rwxr-xr-x | hl_bin/ifconfig | 41 | ||||
-rwxr-xr-x | hl_bin/iostat | 41 | ||||
-rwxr-xr-x | hl_bin/iptables | 41 | ||||
-rwxr-xr-x | hl_bin/make_hl_links | 68 | ||||
-rwxr-xr-x | hl_bin/man | 41 | ||||
-rwxr-xr-x | hl_bin/namei | 41 | ||||
-rwxr-xr-x | hl_bin/netstat | 41 | ||||
-rwxr-xr-x | hl_bin/ps | 41 | ||||
-rwxr-xr-x | hl_bin/rc | 41 | ||||
-rwxr-xr-x | hl_bin/ref_list | 41 | ||||
-rwxr-xr-x | hl_bin/show_all_disks | 41 | ||||
-rwxr-xr-x | hl_bin/strace | 41 | ||||
-rwxr-xr-x | hl_bin/tcpdump | 41 | ||||
-rwxr-xr-x | hl_bin/w | 41 | ||||
-rwxr-xr-x | hl_bin/xxd | 41 |
25 files changed, 1052 insertions, 0 deletions
diff --git a/hl_bin/cal b/hl_bin/cal new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/cal @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/cm b/hl_bin/cm new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/cm @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/df b/hl_bin/df new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/df @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/diff b/hl_bin/diff new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/diff @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/dpkg-query b/hl_bin/dpkg-query new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/dpkg-query @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/ethtool b/hl_bin/ethtool new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/ethtool @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/fdisk b/hl_bin/fdisk new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/fdisk @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/free b/hl_bin/free new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/free @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/hl b/hl_bin/hl new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/hl @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/hl_generic b/hl_bin/hl_generic new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/hl_generic @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/ifconfig b/hl_bin/ifconfig new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/ifconfig @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/iostat b/hl_bin/iostat new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/iostat @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/iptables b/hl_bin/iptables new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/iptables @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/make_hl_links b/hl_bin/make_hl_links new file mode 100755 index 0000000..30c91d7 --- /dev/null +++ b/hl_bin/make_hl_links @@ -0,0 +1,68 @@ +#!/bin/bash +# +# Script for the creation of command substitutes +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_make_hl_links Version 1.1 du 15/09/28 - +# + +HL_BIN="hl_bin" + +CURR_DIR="$(/bin/pwd)" +CURR_DIR_BASE=$(basename $(readlink -f "$CURR_DIR")) + +run_command() +{ + echo "$@" + "$@" +} + +if [ "$CURR_DIR_BASE" != "$HL_BIN" ]; then + echo "$0: refuses to create links in \"$CURR_DIR\" !" + exit 1 +fi + +HL_GENERIC="hl_generic" + +egrep -v '^#|^[ ]*$' <<-EOF | while read cmd + cal + df + diff + dpkg-query + ethtool + fdisk + free + ifconfig + iostat + iptables + man + namei + netstat + ps + strace + tcpdump + w + xxd + +# cm +# hl +# rc +# ref_list +# show_all_disks + +EOF +do + # Be sure that filenames are local + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cmd=$(basename "$cmd") + + if [ ! -e "$cmd" ]; then + ln "$HL_GENERIC" "$cmd" + else + cmp -s "$cmd" "$HL_GENERIC" + if [ $? != 0 ]; then + rm -f "$cmd" + run_command ln "$HL_GENERIC" "$cmd" + fi + fi +done diff --git a/hl_bin/man b/hl_bin/man new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/man @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/namei b/hl_bin/namei new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/namei @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/netstat b/hl_bin/netstat new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/netstat @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/ps b/hl_bin/ps new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/ps @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/rc b/hl_bin/rc new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/rc @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/ref_list b/hl_bin/ref_list new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/ref_list @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/show_all_disks b/hl_bin/show_all_disks new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/show_all_disks @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/strace b/hl_bin/strace new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/strace @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/tcpdump b/hl_bin/tcpdump new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/tcpdump @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/w b/hl_bin/w new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/w @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc diff --git a/hl_bin/xxd b/hl_bin/xxd new file mode 100755 index 0000000..4d89c27 --- /dev/null +++ b/hl_bin/xxd @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Script for command output colorization +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# +# This script call the original programme with all the arguments +# it received, and pipe it to "hl" using its name as the "hl" +# configuration. +# +# In case the user doesn't want the output of the command to +# be colorized, the following syntax must be used : +# USE_HL=no cmd [args ...] +# + +case "$USE_HL" in + n|N|no|NO|0) USE_HL="no" + ;; +esac + +progname="$(basename $0)" +pathname="$(type -p "$progname")" +dirname="$(dirname "$pathname")" + +PATH="$(echo "$PATH" | sed "s|^$dirname:||;s|:$dirname:|:|g")" +export PATH + +if [ "$USE_HL" = "no" ]; then + # No colorization + # ~~~~~~~~~~~~~~~ + "$progname" "$@" + rc=$? +else + # Default behaviour : colorization + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "$progname" "$@" | hl --"$progname" + rc=${PIPESTATUS[0]} +fi + +exit $rc |