bug-bash
[Top][All Lists]
Advanced

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

Re: Stumped on a question of scoping and unset.


From: Freddy Vulto
Subject: Re: Stumped on a question of scoping and unset.
Date: Thu, 26 May 2011 16:50:09 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On 09:11, Steven W. Orr wrote:
> typeset $1 && upvars -a$nn $1 "${aval[@]}"
> 
> The implication seems to be that the typeset command can fail. Is
> this a reasonable thing to worry about?

The idea is that a typeset - besides declaring a variable local -
protects upvars from malicious variable names:

    $ typeset 'ls -l'
    bash: typeset: `ls -l': not a valid identifier
    $ echo $?
    1

Freddy Vulto
http://fvue.nl



reply via email to

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