Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2015 19:02:51 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r276663 - stable/10/bin/sh
Message-ID:  <201501041902.t04J2pHK093524@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Sun Jan  4 19:02:50 2015
New Revision: 276663
URL: https://svnweb.freebsd.org/changeset/base/276663

Log:
  MFC r274254: sh(1): Mention portability issue with shifting zero positional
  parameters.
  
  Per Austin Group issue #459, shifting zero positional parameters may or may
  not be considered an operand error (which causes the shell to exit in most
  cases).

Modified:
  stable/10/bin/sh/sh.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/sh/sh.1
==============================================================================
--- stable/10/bin/sh/sh.1	Sun Jan  4 19:00:39 2015	(r276662)
+++ stable/10/bin/sh/sh.1	Sun Jan  4 19:02:50 2015	(r276663)
@@ -32,7 +32,7 @@
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd September 21, 2014
+.Dd November 7, 2014
 .Dt SH 1
 .Os
 .Sh NAME
@@ -2516,7 +2516,8 @@ and so on,
 decreasing the value of
 .Li $#
 by one.
-If there are zero positional parameters, shifting does not do anything.
+For portability, shifting if there are zero positional parameters
+should be avoided, since the shell may abort.
 .It Ic test
 A built-in equivalent of
 .Xr test 1 .



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501041902.t04J2pHK093524>