On some platforms, egrep prints a deprecation warning to stderr:
egrep: warning: egrep is obsolescent; using grep -E
Use grep -E instead.
This is nice and simple, so no use splitting this commit into 2
separate commits for each of tools and test.
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
local pat="^${proto}6?[[:space:]]+[[:digit:]]+[[:space:]]+[[:digit:]]+[[:space:]]+[^[:space:]]+[[:space:]]+${dst_socket//./\\.}[[:space:]]+ESTABLISHED[[:space:]]+${pid}/${prog}[[:space:]]*\$"
out=$(netstat -tanp |
- egrep "$pat" |
+ grep -E "$pat" |
awk '{ print $4 }')
[ -n "$out" ]
for i in ip disable enable "ban 0" unban listvars ; do
try_command_on_node -v 0 ! $CTDB $i -n $test_node
- if egrep -q "$pat" "$outfile" ; then
+ if grep -Eq "$pat" "$outfile" ; then
echo "OK: \"ctdb ${i}\" fails with expected \"disconnected node\" message"
else
echo "BAD: \"ctdb ${i}\" does not fail with expected \"disconnected node\" message"
EOF
show_all "uname -a"
[ -x /bin/rpm ] && {
- show_all "rpm -qa | egrep 'samba|ctdb|gpfs'"
+ show_all "rpm -qa | grep -E 'samba|ctdb|gpfs'"
}
[ -x /usr/bin/dpkg-query ] && {
show_all "/usr/bin/dpkg-query --show 'ctdb'"