projects
/
shutils.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bd37dc4
)
nsd-dynipwatch: make grep silent
author
Stefan Huber <shuber2@gmx.at>
Sun, 28 Oct 2012 19:41:57 +0000
(20:41 +0100)
committer
Stefan Huber <shuber2@gmx.at>
Sun, 28 Oct 2012 19:41:57 +0000
(20:41 +0100)
nsd-dynipwatch
patch
|
blob
|
history
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