[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $# = 1??
From: |
Karl Kleinpaste |
Subject: |
Re: $# = 1?? |
Date: |
19 Apr 2001 14:35:55 -0400 |
User-agent: |
Gnus/5.090003 (Oort Gnus v0.03) XEmacs/21.4 (Solid Vapor) |
> 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
- $# = 1??, MrEye, 2001/04/19
- Re: $# = 1??,
Karl Kleinpaste <=