/egrep/grep -E/
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
ef81f03e89
commit
817ce9c256
1 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ value="$(cat "$__object/parameter/value" 2>/dev/null \
|
||||||
|
|
||||||
case "$state" in
|
case "$state" in
|
||||||
absent)
|
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
|
# if the key exists, with whatever value, we will have to remove it
|
||||||
# so report it as present
|
# so report it as present
|
||||||
echo present
|
echo present
|
||||||
|
@ -39,10 +39,10 @@ case "$state" in
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
present)
|
present)
|
||||||
if egrep -q "^$key$delimiter+$value$" "$file"; then
|
if grep -q -E "^$key$delimiter+$value$" "$file"; then
|
||||||
# key exists and value is same
|
# key exists and value is same
|
||||||
echo present
|
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
|
# key exists, but value is empty or different
|
||||||
echo wrongvalue
|
echo wrongvalue
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue