[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Document that $((expression)) is not portable.
From: |
Benoit Sigoure |
Subject: |
[PATCH] Document that $((expression)) is not portable. |
Date: |
Sun, 11 Nov 2007 18:48:45 +0100 |
* doc/autoconf.texi (Shell Substitutions): Here.
Signed-off-by: Benoit Sigoure <address@hidden>
---
My bad, the fact that ${foo#bar} and friends are not portable was already
documented under the section `Shell Substitutions'. The only thing that
wasn't documented so far was $((expression)). `${parameter/pattern/string}'
is not documented either but I think that people know it's a Bash extension.
Wouldn't it be easier to list things that actually work on Solaris /bin/sh?
:P
ChangeLog | 5 +++++
doc/autoconf.texi | 8 ++++++++
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index aaf50a8..8605f1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-11 Benoit Sigoure <address@hidden>
+
+ Document that $((expression)) is not portable.
+ * doc/autoconf.texi (Shell Substitutions): Here.
+
2007-11-10 Jim Meyering <address@hidden>
Generate package.m4 in build-dir, not srcdir.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 421056e..42a26ef 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -13061,6 +13061,14 @@ mishandle them. For example, Bash 3.1, @samp{ksh88},
@command{pdksh}
echo $(case x in x) echo hello;; esac)
@end example
+
address@hidden $((@var{expression}))
address@hidden $((@var{expression}))
+Arithmetic expansions are not considered portable as some shells (most
+notably Solaris 10 @command{/bin/sh}) don't support them.
+
+
+
@item ^
@cindex ^ quoting
Always quote @samp{^}, otherwise traditional shells such as
--
1.5.3.5.654.gdd5ec