From owner-freebsd-questions@FreeBSD.ORG Sat Oct 11 17:50:52 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 679132FC for ; Sat, 11 Oct 2014 17:50:52 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (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 2BFBE23A for ; Sat, 11 Oct 2014 17:50:51 +0000 (UTC) Received: from r56.edvax.de (port-92-195-30-92.dynamic.qsc.de [92.195.30.92]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id F14913CEB4; Sat, 11 Oct 2014 19:50:42 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s9BHog9I002006; Sat, 11 Oct 2014 19:50:42 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sat, 11 Oct 2014 19:50:42 +0200 From: Polytropon To: TonyMc Subject: Re: sh man page .... Message-Id: <20141011195042.d33f5a95.freebsd@edvax.de> In-Reply-To: <20141011142538.45c9f45a@elena.home> References: <5437FB8B.9080008@hiwaay.net> <20141011142538.45c9f45a@elena.home> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org 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 17:50:52 -0000 On Sat, 11 Oct 2014 14:25:38 +0100, TonyMc wrote: > It seems to me you have this the wrong way around. /bin/sh is the > Bourne shell, [...] On FreeBSD, /bin/sh is not exactly the (original) Bourne shell, but the Almquist shell, also known as "ash". It implementss the standard features of the Bourne shell. > [...] bash is sh-like, so surely it is the task of the bash > maintainers to document incompatibilities with the Bourne shell? This is a valid opinion. The understanding of bash is "sh plus something more", so when the part "sh" differs from traditional sh implementations or standards, it should be mentioned. Among others, POSIX is such a set of requirements: if all of them are met, the shell can be called a "POSIX shell". > The > "a" in bash is for "again", so it is clearly intended as a Bourne-shell > inspired shell. Or "born again". :-) > 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? Things like "silently assuming or implying something" usually is not a good idea. Sometimes you intededly _want_ a numeric parameter to be differentiable between 0 (the value zero) or "" (empty string, not set), because it makes a difference in the program. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...