projects
/
shutils.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nsd-dynipwatch: make grep silent
[shutils.git]
/
nsd-dynipwatch
diff --git
a/nsd-dynipwatch
b/nsd-dynipwatch
index fd064bbd1b931fd372a617fa9acb7be40f0b7f1f..a002f9576b3f8fa49408fe58af40025801617faf 100755
(executable)
--- a/
nsd-dynipwatch
+++ b/
nsd-dynipwatch
@@
-52,7
+52,7
@@
function run()
newip=`cat ${watchfile}`
echo "`date '+%a %F %T'` :: ${oldip} => ${newip}."
newip=`cat ${watchfile}`
echo "`date '+%a %F %T'` :: ${oldip} => ${newip}."
- if ! echo "${newip}" | egrep "^([0-9]+\\.)+[0-9]+$" ; then
+ if ! echo "${newip}" | egrep
-q
"^([0-9]+\\.)+[0-9]+$" ; then
echo "Wrong format of new IP address."
continue
fi
echo "Wrong format of new IP address."
continue
fi