I have the following issue.
I'm putting a string into a variable , $var1. This string will be a numeric type e.g. 118.
I did the following command line to fill my variable:
var1=$(cat test.html | grep "<quote")
But when I'm putting the variable into the loop below ...
for page in {1..$var1} ; do
wget "http://www.hellomovie.co.uk/movies/decade-2000/year-2001/?page=$page";
done
The wget is getting me this ...
Saved in : «index.html@page={1..118}»
[ <=> ] 135 284 --.-K/s in 0,1s 2014-04-08 15:36:58 (1,07 MB/ - «index.html@page=**{1..118}**.2» saved[135284]`
As you can see, the variable was not taken into account.
I tried the following to make sure that $var1 was seen as a numeric variable , $(($var1)) but to no avail.
I tried expr but to no avail as well.
Did I do something wrong? If yes, can you pintpoint me where?
Any insights will be welcomed.
Cheers.
read var1 < test.html.sedto remove many things. But I will keep it , for later usage. Cheers.