git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] pre-commit.sample: don't use [...] around a tr range

From
Jeff King <peff@peff.net>
Date
Sep 24, 2009, 05:55 UTC
Message-ID
<20090924055518.GB24486@coredump.intra.peff.net>
In-Reply-To
<n2z47RdNjxVbPeRfgJuY54nJrfzDfn43bzv8HoH6cEuAzQ6fB1MaBg@cipher.nrlssc.navy.mil>
On Mon, Sep 21, 2009 at 10:58:51AM -0500, Brandon Casey wrote:
Show 15 quoted lines
> >> I had my doubts, but have just confirmed that Solaris 10's
> >> /usr/bin/tr is still doing it the SYSV way:
> >>
> >>     $ echo foo | LC_ALL=C /usr/bin/tr a-z A-Z
> >>     foo
> >>
> >> There, you have to use /usr/xpg4/bin/tr to get the expected behavior:
> >>
> >>     $ echo foo | LC_ALL=C /usr/xpg4/bin/tr a-z A-Z
> >>     FOO
> >>
> >> So you're right.  Thanks!
> 
> By the way, modern git inserts /usr/xpg4/bin into PATH before /usr/bin on
> Solaris.  So /usr/xpg4/bin/tr should always be used on that platform.

Ah, I forgot about that patch. So it may not matter on Solaris. Are there other platforms which want the brackets? Maybe HP-UX, but I no longer have access to a box and I've used deep hypnosis to suppress any memories of ever having used it.

Anyway, I think Jim's patch is the right fix if there are still platforms that want the brackets.

-Peff
Previous: Brandon Casey
Message 9 of 9 in “pre-commit.sample: don't use [...] around a tr range”
  1. pre-commit.sample: don't use [...] around a tr rangeJim Meyering, Sep 21, 2009
  2. Alex RiesenSep 21, 2009
  3. Jim MeyeringSep 21, 2009
  4. Alex RiesenSep 21, 2009
  5. Jeff KingSep 21, 2009
  6. Jim MeyeringSep 21, 2009
  7. Jeff KingSep 21, 2009
  8. Brandon CaseySep 21, 2009
  9. Jeff KingSep 24, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.