Re: [PATCH] Improve sed portability
- From
Jeff King <peff@peff.net>
- Date
- Jun 12, 2008, 09:07 UTC
- Message-ID
- <20080612090705.GA1055@sigill.intra.peff.net>
- In-Reply-To
- <4850DE67.703@isode.com>
On Thu, Jun 12, 2008 at 09:29:27AM +0100, Chris Ridd wrote:
>> Because the "$1" could contain character sequences that some 'echo' >> implementations mangle. > > Indeed. If $1 started with -n that might cause problems on some platforms.
It's much worse than that. Any backslash sequence can be interpolated. 4b7cc26 (git-am: use printf instead of echo on user-supplied strings).
-Peff