> When trying to run a script, $# is always 1, no matter the number of
> arguments I give it. Is there a setting I need to change?
At the barest minimum, we need to know what version you're running,
and preferably on what platform.
On Linux RH6.2, unpatched 2.05 does just fine.
[1009] [14:31:56] cinnamon:~/tmp> cat arg-counter
#!/bin/bash
echo $#
exit 0
[1010] [14:32:14] cinnamon:~/tmp> arg-counter
0
[1011] [14:32:19] cinnamon:~/tmp> arg-counter test
1
[1012] [14:32:21] cinnamon:~/tmp> arg-counter test test2
2
[1013] [14:32:27] cinnamon:~/tmp> arg-counter test test2 and again
4
[1014] [14:32:31] cinnamon:~/tmp> echo $BASH $BASH_VERSION
/bin/bash 2.05.0(1)-release