summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-01-04 19:02:50 +0000
committerjilles <jilles@FreeBSD.org>2015-01-04 19:02:50 +0000
commit6f128b2d1aeea28705ed13c65395d7719bc3ebb5 (patch)
tree1b5e437a9a995539457d6aa6e91047e6b73e332c /bin
parent973fc27d21a7d89c2b4b12f555af29334ce22836 (diff)
downloadFreeBSD-src-6f128b2d1aeea28705ed13c65395d7719bc3ebb5.zip
FreeBSD-src-6f128b2d1aeea28705ed13c65395d7719bc3ebb5.tar.gz
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).
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/sh.15
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1
index e970e7d..fbe3d81 100644
--- a/bin/sh/sh.1
+++ b/bin/sh/sh.1
@@ -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 .
OpenPOWER on IntegriCloud