Catch Case, where not parameter was given.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
PROGNAME=`basename $0`
|
||||
VERSION="Version 1.1"
|
||||
VERSION="Version 1.1.1"
|
||||
AUTHOR="Guillaume Coré <fridim@onfi.re>, Ales Nosek <ales.nosek@gmail.com>"
|
||||
|
||||
ST_OK=0
|
||||
@@ -43,6 +43,11 @@ print_help() {
|
||||
crit=2
|
||||
fcp=0.1
|
||||
|
||||
if (( $# == 0 )); then
|
||||
echo "UNKNOWN: No parameter given! Please use -h for help!"
|
||||
exit $ST_UK
|
||||
fi
|
||||
|
||||
while getopts “hvu:p:H:P:w:c:f:0” OPTION; do
|
||||
case $OPTION in
|
||||
h)
|
||||
|
||||
Reference in New Issue
Block a user