AIX sed copes with unindented comments, but fails over indentation with space or TAB:
$ echo | sed -e '# comment ' -e ' #indented comment' sed: 0602-403 #indented comment is not a recognized function. $ echo | sed -e ' #indented comment' sed: 0602-403 #indented comment is not a recognized function. OK to push this patch to fix gnulib-tool? Thanks, Ralf 2010-08-21 Ralf Wildenhues <ralf.wildenh...@gmx.de> Fix gnulib-tool sed script de-commentation for AIX sed. * gnulib-tool (sed_comments): Try indented comments, for AIX 5.3 sed. diff --git a/gnulib-tool b/gnulib-tool index bc967e3..b606ad6 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -109,10 +109,10 @@ fi sed_noop='s,x,x,' # sed_comments is true or false, depending whether 'sed' supports comments. -# (The GNU autoconf doc says that sed comments are not portable, but does -# not say which 'sed' versions are affected.) +# AIX 5.3 sed barfs over indented comments. if echo fo | sed -e 's/f/g/ # s/o/u/ + # indented comment s/o/e/' 2>/dev/null | grep ge > /dev/null; then sed_comments=true else