Welcome on my blog

We use cookies to ensure you get the best experience on our website.

TMP

Autor: chmajster 25.09.2023

awk '/^edit / {record=""; inside_record=1} inside_record {record = record $0 ORS} /^quit$/ && inside_record {inside_record=0; if (record ~ /chrvl\*\*\*/) print record}' nazwa_pliku
awk '/^edit / { record = $0; next } /^quit/ { if (record ~ /chrvl[a-zA-Z0-9]{1,4}/) print "\n" record; record = "" } { record = record "\n" $0 }' nazwa_pliku
awk '/^edit / {
    if (record ~ /chrvl\*\*\*/) {
        print record
        print ""
    }
    record = $0
    next
}
/^quit/ {
    if (record ~ /chrvl\*\*\*/) {
        print record
        print ""
    }
    record = ""
}
{
    record = record " " $0
}' nazwa_pliku
Tagi:
Dodaj komentarz

Search
Categories
O Blogu

Cześć Podróżniku!

Ta strona ma nie być typowym poradnikiem w IT, Głównym jej cel to zapisanie krótkich notatek, które mogą się przydać w codziennym życiu podczas korzystania/konfiguracji różnych urządzeń np. Ustawienia DHCP na Routerze Cisco, Ustawieniu Karty sieciowej na Linuxie itp.

Buy me A coffee
[Empty]

Wszelkie prawa zastrzeżone