All pastes #938396 Raw Edit

Untitled

public text v1 · immutable
·published 2008-03-11 16:49 UTC
rendered paste body
cat teste.sh 
#!/bin/bash
while read urls; do
        if [ $(grep -i ${urls} /etc/squid/teste.txt) ]; then
                echo OK
        else
                echo ERR
        fi
done



sh -x teste.sh 
+ read urls
teste teste teste
++ grep -i teste teste teste /etc/squid/teste.txt
grep: teste: No such file or directory
grep: teste: No such file or directory
+ '[' ']'
+ echo ERR
ERR
+ read urls