sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al.

Daniel Braniss danny at cs.huji.ac.il
Sun Oct 10 07:13:26 UTC 2010


>   On 10/9/10 7:30 PM, Garrett Cooper wrote:
> >
> >> [ "..." ] is the same thing as [ -n "..." ] or test -n "..."
> >> [ ! "..." ] is the same things as [ -z "..." ] or test -z "..."
> >> I'll never understand why people have to throw an extra letter in there and
> >> then compare it to that letter.
> > I ran into issues using ! on Solaris ksh recently (not using test),
> > and I agree that your example below is more straightforward and
> > readable than the other examples I've dealt with in the past.
> 
> 
> Ah that reminds me for the reason for "X$foo" = "X"

but grasshopper, in Version 6 there was no test(1), hence the x$1 = x


> 
> it's in case $foo evaluates to "-n" or similar...
> 
> It's been a long time... but these days a data misevaluation leads to 
> such things ad  SQL injection attacks
> and I see no reason that a shell injection attack shouldn't be possible.




More information about the freebsd-hackers mailing list