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

Julian Elischer julian at freebsd.org
Sun Oct 10 05:31:21 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"

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