From rfg@tristatelogic.com  Sun Jan  5 03:51:11 2014
Return-Path: <rfg@tristatelogic.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 19B2A191
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Jan 2014 03:51:11 +0000 (UTC)
Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118])
	by mx1.freebsd.org (Postfix) with ESMTP id ED7791CDA
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  5 Jan 2014 03:51:09 +0000 (UTC)
Received: by segfault.tristatelogic.com (Postfix, from userid 1237)
	id 9A1FC3B29A; Sat,  4 Jan 2014 19:45:19 -0800 (PST)
Message-Id: <20140105034519.9A1FC3B29A@segfault.tristatelogic.com>
Date: Sat,  4 Jan 2014 19:45:19 -0800 (PST)
From: Ronald F.Guilmette <rfg@tristatelogic.com>
Reply-To: Ronald F.Guilmette <rfg@tristatelogic.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: rfg@tristatelogic.com
Subject: sh/bash Parameter Expansion +/- syntax not documented
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         185481
>Category:       docs
>Synopsis:       sh/bash Parameter Expansion +/- syntax not documented
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 05 04:00:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Sun Jan  5 10:40:00 UTC 2014
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
entr0py
>Environment:

FreeBSD 9.1-RELEASE FreeBSD amd64

>Description:

Both /bin/sh and /usr/local/bin/bash appear to correctly implement the
following forms of shell parameter expansion syntax, as required by POSIX
ISO/IEC 9945-2 & ANSI/IEEE Std 1003.3 (1993-12-22):

	${parameter-word}
	${parameter+word}

These forms are not however documented in the "Parameter Expansion"
sections of either the man page for sh or the man page for bash.
(I should perhaps be filing this PR as two separate PRs, one for sh
and one for bash, and will do so upon request.  However my hope is
that whoever fixes one of the two relevant man pages will also have
the courtesy to fix the other as well.)

Note:  The semantics of the two forms of parameter expansion syntax
mentioned above are helpfully and briefly described on the following web
page:

http://serverfault.com/questions/7503/how-to-determine-if-a-bash-variable-is-empty

>How-To-Repeat:

man 1 sh
man 1 bash

>Fix:

The author of this PR will provide diffs/patches for the relevant man pages
upon request, however the fix in each case (sh and bash) should be both
trivial and obvious, I believe.
>Release-Note:
>Audit-Trail:

From: Taras Korenko <ds@ukrhub.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:  
Subject: Re: docs/185481: sh/bash Parameter Expansion +/- syntax not
 documented
Date: Sun, 5 Jan 2014 12:30:13 +0200

 On Sat, Jan 04, 2014 at 07:45:19PM -0800, Ronald F.Guilmette wrote:
 > ...
 > 	${parameter-word}
 > 	${parameter+word}
 > 
 > These forms are not however documented in the "Parameter Expansion"
 > sections of either the man page for sh or the man page for bash.
 > ...
 
 "In the parameter expansions shown previously, use of the colon in the
 format results in a test for a parameter that is unset or null; omission
 of the colon results in a test for a parameter that is only unset."
 
 (c) sh(1) under "Parameter Expansion" section (also on web -> [1]).
 
 --
 1. http://www.freebsd.org/cgi/man.cgi?query=sh&apropos=0&sektion=1&manpath=FreeBSD+9.2-RELEASE&arch=default&format=html
 -- 
   WBR, Taras Korenko
>Unformatted:
