linux user group brescia

immagine del castello

Archivio della mailing list

[LugBS] grep regex

Carlo Bertoldi mcbain a tiscali.it
Ven 9 Ott 2009 19:42:18 UTC
2009/10/9 necro <necro a circolab.net>:
> da man 1 grep :
>   Basic vs Extended Regular Expressions
>          In basic regular expressions the meta-characters ?, +, {, |,
>          (, and ) lose their special meaning; instead use the
>          backslashed versions \?, \+, \{, \|, \(, and \).
>
> Quindi o usi
> du -h | grep "^[0-9]\+M"
> o usi
> du -h | grep -E "[0-9]+M"
do'h!
Grazie, e sì che ho pure letto il manuale :(

 Carlo

-- 
È molto più bello sapere qualcosa di tutto, che sapere tutto di una cosa.

Blaise Pascal




Maggiori informazioni sulla lista Lug