From owner-freebsd-questions@FreeBSD.ORG Sat Oct 11 00:12:15 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E441D4A2 for ; Sat, 11 Oct 2014 00:12:15 +0000 (UTC) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEFBA7F8 for ; Sat, 11 Oct 2014 00:12:15 +0000 (UTC) Received: from kabini1.local (rbn1-216-180-19-95.adsl.hiwaay.net [216.180.19.95]) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id s9B0CEhJ026542 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 10 Oct 2014 19:12:14 -0500 Message-ID: <54387755.8020707@hiwaay.net> Date: Fri, 10 Oct 2014 19:18:29 -0500 From: "William A. Mahaffey III" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: FreeBSD Questions Subject: Re: sh man page .... References: <5437FB8B.9080008@hiwaay.net> <5437FE3D.8070808@hiwaay.net> <20141010105249.23b25ada@mizar.holyordnance.org> In-Reply-To: <20141010105249.23b25ada@mizar.holyordnance.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2014 00:12:16 -0000 On 10/10/14 11:52, Eric S Pulley wrote: >> Well !!!! The sh man page is mute on the fact that an empty string is >> an error in arithmetic or logical evaluations, which is an omission >> irrespective of what bash does :-). I presume that converting Linux >> users to FBSD users is an agenda item here (maybe my error), thus >> suitably complete man pages should be an important goal, I would >> think. I didn't think converting from Linux to FBSD was/is a bad >> habit ;-) .... >> >> > I'm confused, can you ever do arithmetic or logical evaluations on an > empty string?... Why have an entry stating the obvious? If all man > pages did is state the obvious there wouldn't be room for the important > stuff. And then even less people would bother to read them. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > For better or worse, bash does exactly that (do arithmetic or logical evaluations on empty strings), evaluating the empty string to zero (0) .... I didn't write bash, but it is out there, widely used, & thus it is quite possible for someone to accidentally (my case) or otherwise run into &/or expect that behavior .... Given that, it doesn't seem at all out of line to expect that the sh man page might just mention that in passing. IIRC, my old SGI's sh man pages did mention that .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.