Untitled
public text v1 · immutablecat 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