Celso,
O grep e' pobre de regexp mais isso ele faz hehe
man grep
------
-e pattern_list Specifies one or more patterns to be used
during the search for input. Patterns in
pattern_list must be separated by a NEWLINE
character. A null pattern can be specified
by two adjacent newline characters in
pattern_list. Unless the -E or -F option is
also specified, each pattern is treated as a
basic regular expression. Multiple -e and
-f options are accepted by grep. All of the
specified patterns are used when matching
lines, but the order of evaluation is
unspecified.
---------
Ex.
grep -e ricardo -e root /etc/passwd
root:x:0:0:Super-User:/:/bin/ksh
ricardo:x:100:100:Ricardo A. Reis:/export/home/ricardo:/usr/bin/bash
Atenciosamente
Ricardo A. Reis
UNIFESP - SENAI
Unix and System Admin
como à que faria para o "grep" me retornar as ocorrÃncias de "maria",
"jose", "teste", etc .... tudo numa sà linha...
Celso
Olà Celso,
Tenta isto:
$ egrep '(maria|jose|teste)' arquivo
Exemplo:
$ egrep '(root|fredcox)' /etc/passwd
_______________________________________________
Freebsd mailing list
Freebsd@fug.com.br
http://mail.fug.com.br/mailman/listinfo/freebsd_fug.com.br