Это просто с perl
:
perl -l -00 -ne 'print /lock mode.*/ ? $& : "NA"'
-l
устанавливает разделитель выходного поля на новую строку -00
: режим абзаца (записи - это абзацы) -ne код
: запускать код для каждой входной записи режим блокировки
, за которым следует любое количество символов, отличных от новой строки , затем выведите совпадение ( $ &
) или NA
в противном случае. В основном то же, что и решение awk @iruvar , но в perl
.
да, ман-страница debian;
[!] -o, --out-interface name
Name of an interface via which a packet is going to be sent (for packets entering the FORWARD, OUTPUT and POSTROUTING chains). When the "!" argument is used before the
interface name, the sense is inverted. If the interface name ends in a "+", then any interface which begins with this name will match. If this option is omitted, any
interface name will match.