From 52b5402a3c1e0cb9d20ddb7de0abdbbdb3f65163 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 20 Apr 2004 20:14:31 +0000 Subject: [PATCH] (Slashes): New section. --- doc/autoconf.texi | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 701569dd..09a7bfac 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -9269,6 +9269,7 @@ There are other sources of documentation about shells. See for instance * Shell Substitutions:: Variable and command expansions * Assignments:: Varying side effects of assignments * Parentheses:: Parentheses in shell scripts +* Slashes:: Slashes in shell scripts * Special Shell Variables:: Variables you should not change * Limitations of Builtins:: Portable use of not so portable /bin/sh * Limitations of Usual Tools:: Portable use of portable tools @@ -10037,6 +10038,29 @@ esac but the @code{(} in this example is not portable to many older Bourne shell implementations. It can be omitted safely. +@node Slashes +@section Slashes in Shell Scripts +@cindex Shell slashes + +Unpatched Tru64 5.1 @command{sh} omits the last slash of command-line +arguments that contain two trailing slashes: + +@example +$ echo / // /// //// .// //. +/ / // /// ./ //. +$ x=// +$ eval "echo \$x" +/ +$ set -x +$ echo abc | tr -t ab // ++ echo abc ++ tr -t ab / +/bc +@end example + +However, our understanding is that patches are available, so perhaps +it's not worth worrying about working around this horrendous bug. + @node Special Shell Variables @section Special Shell Variables @cindex Shell variables