diff options
author | mbornet-hl <mbornet.pro@wanadoo.fr> | 2015-10-22 16:30:26 +0200 |
---|---|---|
committer | mbornet-hl <mbornet.pro@wanadoo.fr> | 2015-10-22 16:30:26 +0200 |
commit | 3808d1493357a452e154e0f761b647abbefb742d (patch) | |
tree | 76b2970cd945b120a3fff325a42000c60da13c51 | |
parent | 1c9d39b5537a3a263852f7c6ab5dc9005aedc090 (diff) | |
download | hl-3808d1493357a452e154e0f761b647abbefb742d.zip hl-3808d1493357a452e154e0f761b647abbefb742d.tar.gz hl-3808d1493357a452e154e0f761b647abbefb742d.tar.bz2 |
Modified hl_generic : wait / stdout / stderr
-rwxr-xr-x | hl_bin/cal | 23 | ||||
-rwxr-xr-x | hl_bin/cm | 23 | ||||
-rwxr-xr-x | hl_bin/df | 23 | ||||
-rwxr-xr-x | hl_bin/diff | 23 | ||||
-rwxr-xr-x | hl_bin/dpkg-query | 23 | ||||
-rwxr-xr-x | hl_bin/ethtool | 23 | ||||
-rwxr-xr-x | hl_bin/fdisk | 23 | ||||
-rwxr-xr-x | hl_bin/free | 23 | ||||
-rwxr-xr-x | hl_bin/hl | 23 | ||||
-rwxr-xr-x | hl_bin/hl_generic | 23 | ||||
-rwxr-xr-x | hl_bin/ifconfig | 23 | ||||
-rwxr-xr-x | hl_bin/iostat | 23 | ||||
-rwxr-xr-x | hl_bin/iptables | 23 | ||||
-rwxr-xr-x | hl_bin/man | 23 | ||||
-rwxr-xr-x | hl_bin/namei | 23 | ||||
-rwxr-xr-x | hl_bin/netstat | 23 | ||||
-rwxr-xr-x | hl_bin/ps | 23 | ||||
-rwxr-xr-x | hl_bin/rc | 23 | ||||
-rwxr-xr-x | hl_bin/ref_list | 23 | ||||
-rwxr-xr-x | hl_bin/show_all_disks | 23 | ||||
-rwxr-xr-x | hl_bin/strace | 23 | ||||
-rwxr-xr-x | hl_bin/tcpdump | 23 | ||||
-rwxr-xr-x | hl_bin/w | 23 | ||||
-rwxr-xr-x | hl_bin/xxd | 23 |
24 files changed, 432 insertions, 120 deletions
@@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/diff b/hl_bin/diff index 4d89c27..0125919 100755 --- a/hl_bin/diff +++ b/hl_bin/diff @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/dpkg-query b/hl_bin/dpkg-query index 4d89c27..0125919 100755 --- a/hl_bin/dpkg-query +++ b/hl_bin/dpkg-query @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/ethtool b/hl_bin/ethtool index 4d89c27..0125919 100755 --- a/hl_bin/ethtool +++ b/hl_bin/ethtool @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/fdisk b/hl_bin/fdisk index 4d89c27..0125919 100755 --- a/hl_bin/fdisk +++ b/hl_bin/fdisk @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/free b/hl_bin/free index 4d89c27..0125919 100755 --- a/hl_bin/free +++ b/hl_bin/free @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/hl_generic b/hl_bin/hl_generic index 4d89c27..0125919 100755 --- a/hl_bin/hl_generic +++ b/hl_bin/hl_generic @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/ifconfig b/hl_bin/ifconfig index 4d89c27..0125919 100755 --- a/hl_bin/ifconfig +++ b/hl_bin/ifconfig @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/iostat b/hl_bin/iostat index 4d89c27..0125919 100755 --- a/hl_bin/iostat +++ b/hl_bin/iostat @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/iptables b/hl_bin/iptables index 4d89c27..0125919 100755 --- a/hl_bin/iptables +++ b/hl_bin/iptables @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/namei b/hl_bin/namei index 4d89c27..0125919 100755 --- a/hl_bin/namei +++ b/hl_bin/namei @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/netstat b/hl_bin/netstat index 4d89c27..0125919 100755 --- a/hl_bin/netstat +++ b/hl_bin/netstat @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/ref_list b/hl_bin/ref_list index 4d89c27..0125919 100755 --- a/hl_bin/ref_list +++ b/hl_bin/ref_list @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/show_all_disks b/hl_bin/show_all_disks index 4d89c27..0125919 100755 --- a/hl_bin/show_all_disks +++ b/hl_bin/show_all_disks @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/strace b/hl_bin/strace index 4d89c27..0125919 100755 --- a/hl_bin/strace +++ b/hl_bin/strace @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc diff --git a/hl_bin/tcpdump b/hl_bin/tcpdump index 4d89c27..0125919 100755 --- a/hl_bin/tcpdump +++ b/hl_bin/tcpdump @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc @@ -3,10 +3,10 @@ # Script for command output colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# @(#) [MB] cr_hl_generic Version 1.7 du 15/09/26 - +# @(#) [MB] cr_hl_generic Version 1.10 du 15/10/10 - # -# This script call the original programme with all the arguments -# it received, and pipe it to "hl" using its name as the "hl" +# This script calls the original programme with all the arguments +# it received, and pipes it to "hl" using its name as the "hl" # configuration. # # In case the user doesn't want the output of the command to @@ -14,6 +14,12 @@ # USE_HL=no cmd [args ...] # +OUT=/tmp/OUT.$$ +ERR=/tmp/ERR.$$ + +mknod $OUT p +mknod $ERR p + case "$USE_HL" in n|N|no|NO|0) USE_HL="no" ;; @@ -34,8 +40,15 @@ if [ "$USE_HL" = "no" ]; then else # Default behaviour : colorization # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "$progname" "$@" | hl --"$progname" - rc=${PIPESTATUS[0]} + hl -u --"$progname" < "$ERR" & hl --"$progname" < "$OUT" & \ + "$progname" "$@" > "$OUT" 2> "$ERR" + + rc=$? + fi +wait + +rm -f "$OUT" "$ERR" + exit $rc |