Skip to content
Snippets Groups Projects
Commit c651359b authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Merge branch 'handle-empty-value-in-perfadd' into 'master'

handle empty value in ph.perfadd

See merge request !52
parents e3d311df bc0a26c9
No related branches found
No related tags found
1 merge request!52handle empty value in ph.perfadd
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
# 2020-03-05 v1.2 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions # 2020-03-05 v1.2 <axel.hahn@iml.unibe.ch> switch to ph.* helper functions
# 2020-09-01 v1.3 <axel.hahn@iml.unibe.ch> added ph.hasParamoption # 2020-09-01 v1.3 <axel.hahn@iml.unibe.ch> added ph.hasParamoption
# 2022-08-31 v1.4 <axel.hahn@iml.unibe.ch> shellfix corrections # 2022-08-31 v1.4 <axel.hahn@iml.unibe.ch> shellfix corrections
# 2022-10-25 v1.5 <axel.hahn@iml.unibe.ch> handle empty value in ph.perfadd
# ====================================================================== # ======================================================================
...@@ -437,9 +438,9 @@ function ph.perfadd(){ ...@@ -437,9 +438,9 @@ function ph.perfadd(){
local _min=$5 local _min=$5
local _max=$6 local _max=$6
if [ -z "$_min" ]; then test -z "$_value" && _value=0
_min=0 test -z "$_min" && _min=0
fi
echo "${_label}=${_value};${_w};${_c};${_min};${_max}" >>"${ph_perfdatafile}" echo "${_label}=${_value};${_w};${_c};${_min};${_max}" >>"${ph_perfdatafile}"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment