Say, we have a code:
xidel -s https://www.example.com -e '(//span[@class="number"])'
and the output are:
111111
222222
333333
can I do this one below?
for ((n=1;n<=3;n++))
do
a=$(xidel -s https://www.example.com -e '(//span[@class="number"]) [$n]')
b=$a+1
echo $b
done
I expect it to print out 3 edited numbers like this:
111112
222223
333334
it might be a little absurb to download the webpage 3 times, but the reason here is to process each value of the output one by one, using ForLoop.