/egrep/grep -E/

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
remotes/origin/feature_files_export
Steven Armstrong 13 years ago
parent ef81f03e89
commit 817ce9c256
  1. 6
      conf/type/__key_value/explorer/state

@ -29,7 +29,7 @@ value="$(cat "$__object/parameter/value" 2>/dev/null \
case "$state" in
absent)
if egrep -q "^$key$delimiter+" "$file"; then
if grep -q -E "^$key$delimiter+" "$file"; then
# if the key exists, with whatever value, we will have to remove it
# so report it as present
echo present
@ -39,10 +39,10 @@ case "$state" in
fi
;;
present)
if egrep -q "^$key$delimiter+$value$" "$file"; then
if grep -q -E "^$key$delimiter+$value$" "$file"; then
# key exists and value is same
echo present
elif egrep -q "^$key$delimiter+" "$file"; then
elif grep -q -E "^$key$delimiter+" "$file"; then
# key exists, but value is empty or different
echo wrongvalue
else

Loading…
Cancel
Save