From owner-freebsd-questions@FreeBSD.ORG Sat Oct 11 15:00:17 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 C75F569C for ; Sat, 11 Oct 2014 15:00:17 +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 92B2E95 for ; Sat, 11 Oct 2014 15:00:17 +0000 (UTC) Received: from kabini1.local (rbn1-216-180-19-43.adsl.hiwaay.net [216.180.19.43]) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id s9BF0EDn025717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 11 Oct 2014 10:00:15 -0500 Message-ID: <54394775.9020303@hiwaay.net> Date: Sat, 11 Oct 2014 10:06: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@freebsd.org Subject: Re: sh man page .... References: <5437FB8B.9080008@hiwaay.net> <20141011142538.45c9f45a@elena.home> In-Reply-To: <20141011142538.45c9f45a@elena.home> 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 15:00:17 -0000 On 10/11/14 08:25, TonyMc wrote: > On Fri, 10 Oct 2014 10:30:19 -0500 > "William A. Mahaffey III" wrote: > >> >> I have a FBSD 9.3 desktop that supplanted a Linux FC14 desktop used >> for web access, some light development, & other day-to-day tasks >> (i.e. my daily driver, so to speak). I had a bunch of shell scripts >> written to use Linux sh, which was in fact bash, which means it had a >> superset of the arithmetic operators that traditional sh had. When I >> use these scripts under sh under FBSD 9.3, they largely work, though >> there are some minor differences (empty strings evaluate to zero (0) >> under bash, error under sh). The man page for sh doesn't reflect some >> of these compatibilities/incompatibilities, & is a bit short on its >> description of arithmetic evaluations in general. It would be sweet >> if it were updated to document more of the differences/similarities >> w/ bash, since there a clearly a decent number of similarities, & >> only a few (for me) differences. TIA .... >> > It seems to me you have this the wrong way around. /bin/sh is the > Bourne shell, bash is sh-like, so surely it is the task of the bash > maintainers to document incompatibilities with the Bourne shell? The > "a" in bash is for "again", so it is clearly intended as a Bourne-shell > inspired shell. The example you give of silently evaluating empty > strings as numeric zero is exactly the sort of incompatibility that > should be documented in the bash man page. But it is not the sh > shell's problem, surely? > > Tony > > > _______________________________________________ > 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" > Logically perfect :-). I am only whining about the 'oversight' (my word) since I came in the other direction (bash 1st, under Linux, followed by sh under FBSD). I am making the suggestion from a purely logistical POV, since bash is pretty widespread, & people coming to FBSD from Linux may bring their bash scripts & such w/ them. It is by no means *any* impugnment of FBSD, merely a suggestion for the convenience of a more complete man page (which other, older UNICES (SGI, Convex) had). I think FBSD sh does in fact accomodate some bash-ism's, and simply embellishing the arithmetic & logical evaluation sections, w/ no mention of bash, would probably be helpful to many. I obviously touched a nerve here ;-), my bad, but I think my point, if correctly worded, remains valid .... Who knows .... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.