“Como imprimir as próximas linhas com grep” Respostas de código

Como imprimir as próximas linhas com 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

Imprima as próximas 10 linhas após o 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

Como imprimir as próximas linhas com 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

Como imprimir as próximas linhas com 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

Respostas semelhantes a “Como imprimir as próximas linhas com grep”

Perguntas semelhantes a “Como imprimir as próximas linhas com grep”

Mais respostas relacionadas para “Como imprimir as próximas linhas com grep” em Shell/Bash

Procure respostas de código populares por idioma

Procurar outros idiomas de código