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

Re: Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 12, 2008, 13:11 UTC
Message-ID
<alpine.LSU.1.00.0803121410090.1656@racer.site>
In-Reply-To
<20080312124825.GA8447@coredump.intra.peff.net>
Hi,
On Wed, 12 Mar 2008, Jeff King wrote:
Show 24 quoted lines
> On Wed, Mar 12, 2008 at 08:43:36AM -0400, Jeff King wrote:
> 
> > It seems that /usr/bin/tr silently removes NULs from the input stream:
> > 
> >   $ printf 'foo\000bar' | xxd
> >   0000000: 666f 6f00 6261 72                        foo.bar
> >   $ printf 'foo\000bar' | /usr/bin/tr '\000' 'Q' | xxd
> >   0000000: 666f 6f62 6172                           foobar
> > 
> > I don't think there is an easy way around this; we might have to switch
> > to using perl.
> 
> Even more exciting, /usr/bin/tr actually works going the opposite
> direction, but /usr/ucb/tr doesn't:
> 
>   $ echo x | /usr/bin/tr x '\000' | xxd
>   0000000: 000a                                     ..
>   $ echo x | /usr/ucb/tr x '\000' | xxd
>   0000000: 780a                                     x.
> 
> but other characters seem to work:
> 
>   $ echo x | /usr/ucb/tr x '\012' | xxd
>   0000000: 0a0a                                     ..

All the more reson to make more things builtin. (I agree that for tests, we should stay with tr, though.)

Ciao, Dscho

Previous: Jeff King
Message 13 of 13 in “Solaris test failure for git-1.5.4.4 -- t0021-conversion.sh”
  1. Whit ArmstrongMar 11, 2008
  2. Johannes SchindelinMar 11, 2008
  3. Johannes SixtMar 11, 2008
  4. David KastrupMar 11, 2008
  5. Asheesh LaroiaMar 11, 2008
  6. Whit ArmstrongMar 11, 2008
  7. Jeff KingMar 11, 2008
  8. Jeff KingMar 11, 2008
  9. Whit ArmstrongMar 11, 2008
  10. Junio C HamanoMar 12, 2008
  11. Jeff KingMar 12, 2008
  12. Jeff KingMar 12, 2008
  13. Johannes SchindelinMar 12, 2008

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.