curl grep script help
Can someon help me correct this please, run it until successful, five time max. The curl & grep work fine but adding it into a for loop I am unsure of
[CODE]for i in 1 2 3 4 5
do
if curl -s "http://www.blah.com" | grep -A 1 "Username: blah" | tail -n 2| cut -f2 -d " " | cut -f1 -d '<' > file.txt; then
break
sleep 10
fi
done/CODE]
Last edited by bilbonix; 06-11-2014 at 04:06 AM.
|