Re: [PATCH 03/16] more tr portability test script fixes
- From
Jeff King <peff@peff.net>
- Date
- Mar 13, 2008, 13:09 UTC
- Message-ID
- <20080313130918.GI19485@coredump.intra.peff.net>
- In-Reply-To
- <20080313082807.GT10103@mail-vs.djpig.de>
On Thu, Mar 13, 2008 at 09:28:07AM +0100, Frank Lichtenheld wrote:
Show 7 quoted lines
> > - tr '\000' '\012' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1 > > - tr '\000' '\012' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2 > > + perl -pe 'y/\000/\012/' <"$1" | sed -e "$sanitize_diff_raw_z" >.tmp-1 > > + perl -pe 'y/\000/\012/' <"$2" | sed -e "$sanitize_diff_raw_z" >.tmp-2 > > It might make sense performance-wise to integrate the job of the sed > call into the perl call here. Haven't tested it, though.
Probably. My changes were pretty mechanical, and I tried to keep them as small as possible.
I'm not sure we care too much about an extra fork in a test script for performance, though it would probably end up more readable.
-Peff