> -u Treat unset variables as an error when substituting.
>
> I think the behaviour is consistent with the documentation.
The question is rather when to consider a variable set or unset.
For me, an empty string (or empty commadline) is as set or as
unset as an empty array. But I don't get an "
Le 17/12/2010 20:57, Bob Proulx a écrit :
> CGI scripts are not normally setuid but are running as the web
> server process owner
You wish...
> Instead they stem from a script running unverified user provided
> input. [...] It is a problem, and a big one, but completely different from
> having a
jens.schmid...@arcor.de wrote:
-u Treat unset variables as an error when substituting.
I think the behaviour is consistent with the documentation.
The question is rather when to consider a variable set or unset.
I'm not sure about the intended meaning here, but I don't consiter $@ as
a var
On 12/20/10 3:52 AM, jens.schmid...@arcor.de wrote:
>> -u Treat unset variables as an error when substituting.
>>
>> I think the behaviour is consistent with the documentation.
>
> The question is rather when to consider a variable set or unset.
>
> For me, an empty string (or empty commadline)
> > For me, an empty string (or empty commadline) is as set or as
> > unset as an empty array. But I don't get an "unbound error" when
> > accessing an empty string (or empty commandline), and I get one
> > when accessing an empty array.
>
> As the man page says:
>
> A parameter is set if it has
Not exactly sure if this is a bug. But I don't understand why only the
first time running ((i++)) returns an error exit status.
Here's my script:
#! /bin/bash
echo $BASH_VERSION ${BASH_VERSINFO[5]}
set -x
#set -e
i=0
((i++))
echo $?
((i++))
echo $?
And here's what the output looks like:
4.1.7
On 12/20/2010 11:25 AM, Curtis Doty wrote:
> Not exactly sure if this is a bug. But I don't understand why only the
> first time running ((i++)) returns an error exit status.
Because it follows the same semantics as 'expr', where status 1 is
reserved for a successful run with value 0, and status 2
11:30am Eric Blake said:
On 12/20/2010 11:25 AM, Curtis Doty wrote:
Not exactly sure if this is a bug. But I don't understand why only the
first time running ((i++)) returns an error exit status.
Because it follows the same semantics as 'expr', where status 1 is
reserved for a successful run
On Mon, Dec 20, 2010 at 10:38:11AM -0800, Curtis Doty wrote:
> The workaround of using ((++i)) seems to work.
What if i starts at -1?
> Sounds like this is a FAQ.
I have a page at http://mywiki.wooledge.org/BashFAQ/105 in fact.