bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $# = 1??


From: MrEye
Subject: Re: $# = 1??
Date: Fri, 20 Apr 2001 08:54:40 -0400

I am using bash2.04


"Karl Kleinpaste" <karl@charcoal.com> wrote in message
vxk66g0spo4.fsf@cinnamon.vanillaknot.com">news:vxk66g0spo4.fsf@cinnamon.vanillaknot.com...
> > 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]