Re: [PATCH] t/t6000lib.sh: tr portability fix fix
- From
Brandon Casey <casey@nrlssc.navy.mil>
- Date
- Mar 14, 2008, 21:00 UTC
- Message-ID
- <47DAE78B.6050602@nrlssc.navy.mil>
- In-Reply-To
- <20080314205415.GA17728@coredump.intra.peff.net>
Jeff King wrote:
> On Fri, Mar 14, 2008 at 03:47:37PM -0500, Brandon Casey wrote: >> If the dashdash notation is not portable, then >> backslashing each dash also works. i.e. '\-\-\-\-..
> I wonder if there are > systems that will get confused about it being a range.
Oh, now I understand _why_ backslashing the dashes worked. When your email arrived I was still trying to figure out why
echo hello | tr aeiou '\-\-\-\-\-'
correctly converted the e and o into dashes. Because tr must have a way for the user to escape the range notation. I don't use tr very often.
-brandon