From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 10 07:13:26 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CA211065670; Sun, 10 Oct 2010 07:13:26 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id F15188FC15; Sun, 10 Oct 2010 07:13:25 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1P4pq3-000CSR-QS; Sun, 10 Oct 2010 08:56:55 +0200 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Julian Elischer In-reply-to: <4CB14FD5.9090505@freebsd.org> References: <1286397912.27308.40.camel@localhost.localdomain> <51B4504F-5AA4-47C5-BF23-FA51DE5BC8C8@vicor.com> <238E0B24-AA12-4684-9651-84DA665BE893@vicor.com> <4CB14FD5.9090505@freebsd.org> Comments: In-reply-to Julian Elischer message dated "Sat, 09 Oct 2010 22:32:05 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 10 Oct 2010 08:56:55 +0200 From: Daniel Braniss Message-ID: Cc: Brandon Gooch , freebsd-hackers@freebsd.org, Devin Teske , Garrett Cooper Subject: Re: sysrc -- a sysctl(8)-like utility for managing /etc/rc.conf et. al. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Oct 2010 07:13:26 -0000 > 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.