• [^] # Re: exclure grep

    Posté par . En réponse au message Programmation script shell ksh unix. Évalué à -1.

    Attention, c'est pas portable car spécifique à bash.

    Bash :
    $ ps aux | grep gre[p]
    xxx 2892 0.0 0.1 3476 804 pts/0 R+ 13:33 0:00 grep gre[p]
    $

    Dash (shell minimal posix) :
    $ ps aux | grep gre[p]
    $

    Zsh :
    $ ps aux PG gre[p]
    zsh: no matches found: gre[p]
    $