From cc5b71d536df03199c7672b002d85c7b729268a3 Mon Sep 17 00:00:00 2001 From: daryl Date: Thu, 26 May 2022 16:01:32 +0930 Subject: [PATCH] Add 'bash/usage_help.bash' --- bash/usage_help.bash | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 bash/usage_help.bash diff --git a/bash/usage_help.bash b/bash/usage_help.bash new file mode 100644 index 0000000..135b924 --- /dev/null +++ b/bash/usage_help.bash @@ -0,0 +1,13 @@ +#!/bin/bash + +Usage() +{ + echo -e "\nUsage: $(basename "$0") [-a|-b|-c]" + echo "Anything else you'd like to say, explain arguments, etc." +} + +# Somewhere soon we do argument parsing and hit -h|--help: +Usage # Yes, it's that simple. + +# Or find an invalid argument: +Usage # Still easy, and now we've reused code.