Операционная система Linux


Пример 8.14


[methody@localhost methody]$ grep Methody bin/script

echo 'Hello, Methody!'

[methody@localhost methody]$ grep -q Methody bin/script ; echo $?

0

[methody@localhost methody]$ grep -q Shogun bin/script ; echo $?

1

[methody@localhost methody]$ if grep -q Shogun bin/script ; then echo "Yes"; fi

[methody@localhost methody]$ if grep -q Methody bin/script ; then echo "Yes"; fi

Yes




Начало  Назад  Вперед



Книжный магазин