I think the following is accurate:
bash, the shell (command interpreter), will do "shell expansion" of special characters. This means that, when I ran 'cp -r test1/* test2' above, it found test1/1 and test1/2, so the command that actually gets run is 'cp -r test1/1 test1/2 test2', which copies test1/1 and test1/2 into test2. The "cp" command itself does not interpret this.
There are other special characters that are interpreted, too, such as "$". Putting an argument inside double quotes will cause it to all be one argument -- whether or not there are spaces. Furthermore, it does not do the filename expansion. Putting the argument in single quotes will do the same, but it will also disable additional parsing, such as looking for variables ("$").
To escape (make bash ignore the special meaning of) one character, you can use a backslash. You would need to use single quotes or two backslashes in a row to pass a backslash to a command.
You can use "echo" to learn how this works. Try the following commands, and see if you can understand why they behave as they do:
Code:
echo *
echo "*"
echo '*'
echo \*
echo $PATH
echo "$PATH"
echo '$PATH'
echo \$PATH
echo "\$PATH"
echo \\
echo "\\"
echo '\\'
echo '\'
echo ;
echo \;
The last few are more difficult -- but try to at least learn what the first four mean.
By the way, it is kind of insecure to pass passwords as part of the command -- given that that is logged. If wget doesn't automatically ask for a password, you should be able to use "--ask-password" to force it to do so (see "man wget" and "wget --help").
I hope this helps and am glad you got it working.