“Jak wydrukować następne linie z GREP” Kod odpowiedzi

Jak wydrukować następne linie z GREP

grep -A 2 "searchText" mytext.txt ## next 2 lines after match line
grep -B 2 "seacrchText" mytext.txt ## next 2 lines before match line
grep -C 2 "searchText" mytext.txt ## next 2 lines before and after match line
Kirk-Patrick Brown

Wydrukuj następne 10 linii po GREP

grep -A 2 "app" mytext.txt //prints two lines after the match line
grep -B 2 "app" mytext.txt //prints two lines before the match line
Kirk-Patrick Brown

Jak wydrukować następne linie z GREP

grep -A 2 "searchText" mytext.txt ## next 2 lines after match line
grep -B 2 "seacrchText" mytext.txt ## next 2 lines before match line
grep -C 2 "searchText" mytext.txt ## next 2 lines before and after match line
Kirk-Patrick Brown

Jak wydrukować następne linie z GREP

grep -A 2 "searchText" mytext.txt ## next 2 lines after match line
grep -B 2 "seacrchText" mytext.txt ## next 2 lines before match line
grep -C 2 "searchText" mytext.txt ## next 2 lines before and after match line
Kirk-Patrick Brown

Odpowiedzi podobne do “Jak wydrukować następne linie z GREP”

Pytania podobne do “Jak wydrukować następne linie z GREP”

Więcej pokrewnych odpowiedzi na “Jak wydrukować następne linie z GREP” w Shell/Bash

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu