On 7/27/07, Alex <[EMAIL PROTECTED]> wrote: > Perfeito cara, funcionou. > > Em 27/07/07, Alexandre Biancalana <[EMAIL PROTECTED]> escreveu: > > #!/bin/sh > > > > string=`egrep "127|localhost" /etc/hosts` > > > > if [ -n "$string" ]; then > > > > echo "Aqui!" > > fi
Não é preciso armazenar o resultado num string: if grep -E -q "127|localhost" /etc/hosts; then echo Aqui fi -- Carlos A. M. dos Santos ------------------------- Histórico: http://www.fug.com.br/historico/html/freebsd/ Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd