Re: [PATCH] echo: fix octal escaping with \1...\7

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike Frysinger <vapier@xxxxxxxxxx> wrote:
> POSIX states that octal escape sequences should take the form \0num
> when using echo.  dash however additionally treats \num as an octal
> sequence.  This breaks some packages (like libtool) who attempt to
> use strings with these escape sequences via variables to execute sed
> (since sed ends up getting passed a byte instead of a literal \1).

OK this is a bit of problem.  From our conversation I had the
impression that you were referring to the lack of support of
escape codes, rather than unwanted support.

If it was the former I could easily add it if POSIX said so,
however, as this is an existing feature there may well be scripts
out there that depend on it.  So removing it is not an option
unless it is explicitly forbidden by POSIX.

In any case, scripts that rely on escape codes like this are
simply broken and should either be fixed to use printf or just
run with #!/bin/bash.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux