made "usage:" error message take $0 instead of being hardcoded
authorgit <redacted>
Mon, 16 Feb 2026 15:02:19 +0000 (10:02 -0500)
committergit <redacted>
Mon, 16 Feb 2026 15:03:40 +0000 (10:03 -0500)
tobin
todec
tohex

diff --git a/tobin b/tobin
index 58c0eae07f7fe70e6e3b6448d72717d8cae4c51c..a10a72ddf57e91c77c2386ba691d2499f92d55ed 100755 (executable)
--- a/tobin
+++ b/tobin
@@ -28,7 +28,7 @@ conv() {
 
 
 main() {
-       USAGE="usage: tobin [-mnp] ..."
+       USAGE="usage: ${0} [-mnp] ..."
        if ! [ "$1" = "x" ] && ! [ -t 0 ]; then
                cat | tr '\n' ' ' | xargs tobin "x" "$@"
                return "$?"
diff --git a/todec b/todec
index 5ef3a847d66b1603405b694ab78a049c9396d98f..30affa2bd78f2da95df6c55b0a972cb9dd253477 100755 (executable)
--- a/todec
+++ b/todec
@@ -28,7 +28,7 @@ conv() {
 
 
 main() {
-       USAGE="usage: todec [-mnKMG] ..."
+       USAGE="usage: ${0} [-mnKMG] ..."
        if ! [ "$1" = "x" ] && ! [ -t 0 ]; then
                cat | tr '\n' ' ' | xargs todec "x" "$@"
                return "$?"
diff --git a/tohex b/tohex
index 733d07aeff02dbc032897b4dded9752455af3bdd..3eab3b05d8166d23a5ff76d9d710da1da6c18518 100755 (executable)
--- a/tohex
+++ b/tohex
@@ -26,7 +26,7 @@ conv() {
 
 
 main() {
-       USAGE="usage: tohex [-lmnp] ..."
+       USAGE="usage: ${0} [-lmnp] ..."
        if ! [ "$1" = "x" ] && ! [ -t 0 ]; then
                cat | tr '\n' ' ' | xargs tohex "x" "$@"
                return "$?"