Peter Pentchev ☫ → To [email protected] @ Thu, Aug 22, 2013 14:12
+0300
>
> [ ... ]
>
> Так что:
>
> if echo "$TO_DISK_INFO" | fgrep -e "$SERIAL_SHORT" | fgrep -qe "$SERIALTO";
> then
> ...
> fi
Это всё, конечно, хорошо, но человек хотел, чтобы блок внутри if ... fi
выполнился, если grep выполнится _неуспешно_. Простого способа, как это
сделать, я сходу не нашел, если только не городить что-то типа:
if echo "$TO_DISK_INFO" | fgrep -e "$SERIAL_SHORT" | fgrep -qe "$SERIALTO" ||
true; then
...
fi
что, согласитесь, не очень читабельно.
--
Bright regards, Sergey Korobitsin,
Chief Research Officer
Arta Software, http://arta.kz/
xmpp:[email protected]
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive:
http://lists.debian.org/[email protected]