i=0
numberofproducts=${#urls[@]} #gets number of entries in array called "urls"
numberofproductsminusone=`expr $numberofproducts - 1` #-subtract by one
while [$i -lt $numberofproducts]
do
wget ${urls[$i]}
i=$(( $i + 1 ))
sleep 10
done
I'm getting an error
./scrape: line 22: [0: command not found
that line corresponds with the "while" line.
Could anyone help me with this ? I googled but none of the examples I found were relevant to this.
Yoda
February 25, 2013, 3:18pm
2
Put a space in between the square brackets and variables:
while [ $i -lt $numberofproducts ]
alister
February 25, 2013, 3:20pm
3
Add a space between the [ and the $ on that line.
Regards,
Alister
---------- Post updated at 03:20 PM ---------- Previous update was at 03:18 PM ----------
Curse you, bipinajith!!! You beat me to the treasure yet again. I shall have my revenge!!! Just you wait. MWUAAHAHAHAHA.
Yoda
February 25, 2013, 3:31pm
4
Reminds me of Maximus Decimus Meridius in Gladiator... hahaha
Understanding the results: Indexed URL
Important notes:
This is not a live test. This tool describes the most recently indexed version of a page, not the live version on the web. The information shown in the tool is used by Google to evaluate Search results. Your page may have changed or become unavailable since Google last saw it. To test the current version of the page as Google would see it, select the Live Test button on the page.
The "Last crawl" date under Index coverage, shows the date when the information shown here was retrieved (if the page was successfully crawled).
"URL is on Google" doesn't actually mean that your page is appearing in Search results. Actual appearance in Search results requires that the page and its structured data conform to quality and security guidelines. The URL Inspection tool doesn't take into account manual actions, content removals, or temporarily blocked URLs. To see if your URL is appearing, search for your URL on Google; if your URL is missing but this tool says it was indexed, here's how to find out why.