Files
CodeSnippets/bash/usage_help.bash
2022-05-26 16:01:32 +09:30

14 lines
334 B
Bash

#!/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.