“Греп второй матч” Ответ

Греп второй матч

#Combine grep and tail for grepping until second match and filtering 
#last with tail command
grep -m2 "two" in-file.txt | tail -n1
Armandres

Греп первый матч

Just combine grep with head command for filtering  only the first match as:
grep "match" | head -n 1   #Change 1 to not only match first but further matches
Armandres

Ответы похожие на “Греп второй матч”

Вопросы похожие на “Греп второй матч”

Больше похожих ответов на “Греп второй матч” по Shell/Bash

Смотреть популярные ответы по языку

Смотреть другие языки программирования