Bash: including variables in command-line arguments
<p>I have the following bash script, which is supposed to spider a range of IP addresses.</p>

<pre><code>#!/bin/bash 
a = 0    
    for i in `seq 1 255`;
        do
            a = a + 1
            echo $i
            wget -r --spider -D --header="Accept: text/html"  --user-agent="Order Of The Mouse: Stress Tester" 139.162.246.$a:80
        done
</code></pre>

<p>However, at the moment it doesn't include the variable <code>a</code>. How do I properly include a variable in a command line argument when writing a bash script?</p>

<p>Current output looking like this:</p>

<pre><code>/root/burningWood/scripts/StressTest/tester.sh: line 5: a: command not found
254
Spider mode enabled. Check if remote file exists.
--2016-08-28 13:23:10--  http://139.162.246./
Resolving 139.162.246. (139.162.246.)... failed: Name or service not known.
wget: unable to resolve host address ‘139.162.246.’
Found no broken links.
</code></pre>