• # man grep

    Posté par . En réponse au message Imprimer les lignes avant et apres l'expression rechercher. Évalué à 1.

    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 '\-\-'