Shell – Adding Sleep command to shell script

shellsleep

How can I add a 10sec sleep to my loop after each page is processed?

#!/bin/sh

for page in {1..50}
do
    wget -q -U Mozilla "http://admin.domain.com/products_search/?p=$page" -O - \
    | tr '"' '\n' | grep "^Product photo for " | cut -d ' ' -f 3 > bproduct.txt
done

Best Answer

#!/bin/sh

for page in {1..50}
do
    wget -q -U Mozilla "http://admin.domain.com/products_search/?p=$page" -O - \
    | tr '"' '\n' | grep "^Product photo for " | cut -d ' ' -f 3 > bproduct.txt
    sleep 10
done

Should work