[Edit] I've summarized the answer to the following below, the error lies in the line:
[Edit] if [$1 ne $value]; then
I'm trying to pass a value to a command:
#!/bin/bash
for value in $(mycommand $1)
do
echo Found $value
if [$1 ne $value]; then
echo No match!
if
done
But if I type in the following to execute the script:
#./myscript 25
I get the error:
Found somestuff
./myscript: 25: command not found
What I'd like to do is pass in the first argument of the script ("25" in the example above) and send it to the command 'mycommand'.
How can I do this?