Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Andreas Schwab
John Keeping writes: > So the portable way to do it is: > > sed "s/^From:/$header: ex...@address.com\ > From:/" cover-to-edit.patch >"$cover" && That wouldn't work as \ is removed in double quotes. You either need to double the backslash or put it in single quotes. Andreas. -- Andreas

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Junio C Hamano
John Keeping writes: > Note that quoted section of POSIX says "embedded in the pattern space"; > under the description of the "s" command, it says: > > The replacement string shall be scanned from beginning to end. > [...] > The meaning of a immediately followed by any >

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread David Kastrup
Junio C Hamano writes: > Torsten Bögershausen writes: > >> t9001 used a '\n' in a sed expression to split one line into two lines. >> Some versions of sed simply ignore the '\' before the 'n', treating >> '\n' as 'n'. >> >> As the test already requires perl as a prerequisite, use perl instead of

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread John Keeping
On Wed, Jun 04, 2014 at 10:42:46AM -0700, Junio C Hamano wrote: > Torsten Bögershausen writes: > > > t9001 used a '\n' in a sed expression to split one line into two lines. > > Some versions of sed simply ignore the '\' before the 'n', treating > > '\n' as 'n'. > > > > As the test already require

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Torsten Bögershausen
On 2014-06-04 20.13, Junio C Hamano wrote: > Junio C Hamano writes: > >> Torsten Bögershausen writes: >> >>> t9001 used a '\n' in a sed expression to split one line into two lines. >>> Some versions of sed simply ignore the '\' before the 'n', treating >>> '\n' as 'n'. >>> >>> As the test alread

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Junio C Hamano
Junio C Hamano writes: > Torsten Bögershausen writes: > >> t9001 used a '\n' in a sed expression to split one line into two lines. >> Some versions of sed simply ignore the '\' before the 'n', treating >> '\n' as 'n'. >> >> As the test already requires perl as a prerequisite, use perl instead of

Re: [PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Junio C Hamano
Torsten Bögershausen writes: > t9001 used a '\n' in a sed expression to split one line into two lines. > Some versions of sed simply ignore the '\' before the 'n', treating > '\n' as 'n'. > > As the test already requires perl as a prerequisite, use perl instead of sed. > > Signed-off-by: Torsten

[PATCH] t9001: avoid not portable '\n' with sed

2014-06-04 Thread Torsten Bögershausen
t9001 used a '\n' in a sed expression to split one line into two lines. Some versions of sed simply ignore the '\' before the 'n', treating '\n' as 'n'. As the test already requires perl as a prerequisite, use perl instead of sed. Signed-off-by: Torsten Bögershausen --- t/t9001-send-email.sh |