docs/185481: sh/bash Parameter Expansion +/- syntax not documented

Ronald F.Guilmette rfg at tristatelogic.com
Sun Jan 5 04:00:00 UTC 2014


>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:
>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:
>Unformatted:


More information about the freebsd-doc mailing list