Sime? tapped away at the keyboard with:
How can I make an 'and' with a regular expression ? I 'm trying to select lines from a file that has "root" and "exit" with grep.
try something like grep exit `grep -l root *` grep will only match patterns on one line. That's probably not what you want. A Perl(*) solution (don't snigger!) is possible without the command substitution (back-quotes). OTOH, awk might do the same trick in 10% of the memory and CPU cycles. :-) (*) Pathologically-Eclectic Rubbish Lister -- Bernd Felsche - Innovative Reckoning Perth, Western Australia -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/