Skip to content
Snippets Groups Projects

reverse return code in ph.hasParamoption

Merged Hahn Axel (hahn) requested to merge 6629-fix-returnvalue-hasParamOption into master
4 files
+ 32
27
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -186,7 +186,7 @@ This will set variable iWarnLimit based on CLI parameter -w [value] ... if it do
@@ -186,7 +186,7 @@ This will set variable iWarnLimit based on CLI parameter -w [value] ... if it do
### ph.hasParamoption
### ph.hasParamoption
check if a letter was used as command line option and return as 0 (=no) or 1 (=yes)
check if a letter was used as command line option and return as 0 (=true) or 1 (=false)
Syntax:
Syntax:
@@ -201,10 +201,12 @@ Parameters:
@@ -201,10 +201,12 @@ Parameters:
Example:
Example:
 
Show a help if command line param ``-h`` was given - or no parameter.
 
```bash
```bash
bOptHelp=`ph.hasParamoption "h" "$@"`
ph.hasParamoption "h" "$@" ; bOptHelp=$?
if [ $bOptHelp -eq 1 -o $# -lt 1 ]; then
if [ $bOptHelp -eq 0 -o $# -lt 1 ]; then
_usage
_usage
exit 0
exit 0
fi
fi
Loading