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