2011/1/21 Agustin Martin <agmar...@debian.org>:
> if [ "$MILTERSOCKET" ] && [ "`echo $MILTERSOCKET | grep -v ^inet`" ]; then
>
> but as Teodor points out (just read it), second check seems to be enough.

Only that I realized latter the intention of this construction. My
previous suggestion was to use this construction on its own without
"test":

if echo "$MILTERSOCKET" | grep -q -v "^inet"; then
...
fi
(the return code is set by grep)

This works too but there is an extra test for the empty string:
if [ "$(echo $MILTERSOCKET | grep -v ^inet)" ]; then
...
fi
(the return code is set by 'test')

Thanks



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to