shell-script-pt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grep


From: Vini
Subject: Grep
Date: Wed, 17 Jan 2007 11:19:37 -0200

Pessoal,

estou tentando executar o script abaixo mais ele ta dando erro....


#!/bin/bash

for i in `cat /etc/postfix/exclude.list`
do
        if [ $i <> "OK" ]
        then
                exclude="$exclude | grep -v $i"
        fi
done

cat /etc/postfix/recipients $exclude
### FIM ####



exclude.list :

teste1

recipients:

teste OK
teste1 OK
teste2 OK
teste3 OK

se eu der um echo na ultima linha (echo "cat /etc/postfix/recipients
$exclude") e executar a saida dele funciona, mais se eu tentar executar o
script e ele retorna a seguinte mensagem de erro:

teste OK
teste1 OK
teste2 OK
teste3 OK
cat: |: Arquivo ou diretório não encontrado
cat: grep: Arquivo ou diretório não encontrado
teste1



Alguem tem idéia do que pode ser?

-- 
Atenciosamente,
Vinicius.


[As partes desta mensagem que não continham texto foram removidas]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]