From 5c55fb1f4db4ce31263d71744014eddde28071fd Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 25 Mar 2008 21:19:58 -0600 Subject: [PATCH] Document busybox sed bug. * doc/autoconf.texi (Limitations of Usual Tools): Mention restrictions when using back-references. Reported by Vincent Lefevre: . Signed-off-by: Eric Blake --- ChangeLog | 6 ++++++ doc/autoconf.texi | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0aab3983..7f82ee21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-03-26 Eric Blake + Document busybox sed bug. + * doc/autoconf.texi (Limitations of Usual Tools): Mention + restrictions when using back-references. + Reported by Vincent Lefevre: + . + Document Automake interaction with AC_CONFIG_MACRO_DIR. * doc/autoconf.texi (Input): Mention ACLOCAL_AMFLAGS for automake users. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 17b90455..b72d8757 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -15389,6 +15389,20 @@ flushleft indented @end example +Posix requires that with an empty regular expression, the last non-empty +regular expression from either an address specification or substitution +command is applied. However, busybox 1.6.1 complains when using a +substitution command with a replacement containing a back-reference to +an empty regular expression; the workaround is repeating the regular +expression. + +@example +@kbd {echo abc | busybox sed '/a\(b\)c/ s//\1/'} +sed: No previous regexp. +@kbd {echo abc | busybox sed '/a\(b\)c/ s/a\(b\)c/\1/'} +b +@end example + @item @command{sed} (@samp{t}) @c --------------------------- -- 2.11.4.GIT