• [^] # Je dirai même plus

    Posté par (site web personnel) . En réponse au message Imprimer les lignes avant et apres l'expression rechercher. Évalué à 4.

    $ man -P cat grep | grep context -A3
    Print NUM lines of trailing context after matching lines.
    Places a line containing -- between contiguous groups of
    matches.

    --
    Print NUM lines of leading context before matching lines.
    Places a line containing -- between contiguous groups of
    matches.

    --
    Print NUM lines of output context. Places a line containing --
    between contiguous groups of matches.

    -b, --byte-offset
    --
    the presence of trailing context lines. This enables a calling
    process to resume a search. When grep stops after NUM matching
    lines, it outputs any trailing context lines. When the -c or
    --count option is also used, grep does not output a count
    greater than NUM. When the -v or --invert-match option is also
    used, grep stops after outputting NUM non-matching lines.

    Adhérer à l'April, ça vous tente ?