OPTIONS
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines. Places a line containing -- between contiguous groups of matches.
-B NUM, --before-context=NUM
Print NUM lines of leading context before matching lines. Places a line containing -- between contiguous groups of matches.
Soit un truc du genre : cat ton_fichier | grep -B2 -A1 'processed : 0' | grep -v '\-\-'
# man grep
Posté par pini . En réponse au message Imprimer les lignes avant et apres l'expression rechercher. Évalué à 1.
Soit un truc du genre :
cat ton_fichier | grep -B2 -A1 'processed : 0' | grep -v '\-\-'