summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbornet-hl <mbornet.pro@wanadoo.fr>2015-10-22 16:30:26 +0200
committermbornet-hl <mbornet.pro@wanadoo.fr>2015-10-22 16:30:26 +0200
commit3808d1493357a452e154e0f761b647abbefb742d (patch)
tree76b2970cd945b120a3fff325a42000c60da13c51
parent1c9d39b5537a3a263852f7c6ab5dc9005aedc090 (diff)
downloadhl-3808d1493357a452e154e0f761b647abbefb742d.zip
hl-3808d1493357a452e154e0f761b647abbefb742d.tar.gz
hl-3808d1493357a452e154e0f761b647abbefb742d.tar.bz2
Modified hl_generic : wait / stdout / stderr
-rwxr-xr-xhl_bin/cal23
-rwxr-xr-xhl_bin/cm23
-rwxr-xr-xhl_bin/df23
-rwxr-xr-xhl_bin/diff23
-rwxr-xr-xhl_bin/dpkg-query23
-rwxr-xr-xhl_bin/ethtool23
-rwxr-xr-xhl_bin/fdisk23
-rwxr-xr-xhl_bin/free23
-rwxr-xr-xhl_bin/hl23
-rwxr-xr-xhl_bin/hl_generic23
-rwxr-xr-xhl_bin/ifconfig23
-rwxr-xr-xhl_bin/iostat23
-rwxr-xr-xhl_bin/iptables23
-rwxr-xr-xhl_bin/man23
-rwxr-xr-xhl_bin/namei23
-rwxr-xr-xhl_bin/netstat23
-rwxr-xr-xhl_bin/ps23
-rwxr-xr-xhl_bin/rc23
-rwxr-xr-xhl_bin/ref_list23
-rwxr-xr-xhl_bin/show_all_disks23
-rwxr-xr-xhl_bin/strace23
-rwxr-xr-xhl_bin/tcpdump23
-rwxr-xr-xhl_bin/w23
-rwxr-xr-xhl_bin/xxd23
24 files changed, 432 insertions, 120 deletions
diff --git a/hl_bin/cal b/hl_bin/cal
index 4d89c27..0125919 100755
--- a/hl_bin/cal
+++ b/hl_bin/cal
@@ -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/cm b/hl_bin/cm
index 4d89c27..0125919 100755
--- a/hl_bin/cm
+++ b/hl_bin/cm
@@ -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/df b/hl_bin/df
index 4d89c27..0125919 100755
--- a/hl_bin/df
+++ b/hl_bin/df
@@ -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
diff --git a/hl_bin/hl b/hl_bin/hl
index 4d89c27..0125919 100755
--- a/hl_bin/hl
+++ b/hl_bin/hl
@@ -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
diff --git a/hl_bin/man b/hl_bin/man
index 4d89c27..0125919 100755
--- a/hl_bin/man
+++ b/hl_bin/man
@@ -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
diff --git a/hl_bin/ps b/hl_bin/ps
index 4d89c27..0125919 100755
--- a/hl_bin/ps
+++ b/hl_bin/ps
@@ -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/rc b/hl_bin/rc
index 4d89c27..0125919 100755
--- a/hl_bin/rc
+++ b/hl_bin/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
diff --git a/hl_bin/w b/hl_bin/w
index 4d89c27..0125919 100755
--- a/hl_bin/w
+++ b/hl_bin/w
@@ -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/xxd b/hl_bin/xxd
index 4d89c27..0125919 100755
--- a/hl_bin/xxd
+++ b/hl_bin/xxd
@@ -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