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

Re: /etc/shells management

On Mon, Sep 08, 2003 at 10:10:34AM +0100, Colin Watson wrote:
> On Mon, Sep 08, 2003 at 03:42:06AM -0500, Branden Robinson wrote:
> > But if $var contains more than one shell word...
> > 
> > You might get different results dependening on whether you remember to
> > quote the shell variable or not.
> Whoa. You don't reflexively quote shell variables and have to think
> about when *not* to quote them? :) Certainly, if you leave the variables
> unquoted, 'test -n $var' is hardly any more reliable than just 'test
> $var', and I would trust neither against hostile input.

People *should* quote their shell variables in general, yes.  But this
subthread is both about recommended practices and the Policy manual.

It's not a Policy violation for someone to say if [ $var ], it's just a
bad idea.  :)

G. Branden Robinson                |     Communism is just one step on the
Debian GNU/Linux                   |     long road from capitalism to
branden@debian.org                 |     capitalism.
http://people.debian.org/~branden/ |     -- Russian saying

Attachment: pgpvo5lImpC4q.pgp
Description: PGP signature

Reply to: