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

Re: [PATCH] Replace "echo -n" with printf in shell scripts.

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
Jan 17, 2007, 18:07 UTC
Message-ID
<Pine.LNX.4.64.0701171804260.26185@reaper.quantumfyre.co.uk>
In-Reply-To
<7vk5zlsglk.fsf@assigned-by-dhcp.cox.net>
On Wed, 17 Jan 2007, Junio C Hamano wrote:
Show 18 quoted lines
> "Horst H. von Brand" <vonbrand@inf.utfsm.cl> writes:
>
>> Junio C Hamano <junkio@cox.net> wrote:
>>> Jason Riedy <ejr@EECS.Berkeley.EDU> writes:
>>>> Not all echos know -n.  This was causing a test failure in
>>>> t5401-update-hooks.sh, but not t3800-mktag.sh for some reason.
>>>
>>> We have done this already so it might be too late to raise this
>>> question, but does everybody have printf?
>>
>> Here (Fedora rawhide) /usr/bin/printf is part of coreutils.
>
> I am reasonably sure people on Linux land would be fine
> regardless of distros, but thanks anyway.
>
> The problematic are less common ones, ranging from (not so less
> common) OSX, Solaris to (much less common) AIX that some people
> seem to run git on (or at least compile git for).
printf is a bash builtin ... not sure about other shells.
-- 
Julian

  ---
A lifetime isn't nearly long enough to figure out what it's all about.
Previous: Brian GernhardtNext: Horst H. von Brand
Message 8 of 11 in “Replace "echo -n" with printf in shell scripts.”
  1. Replace "echo -n" with printf in shell scripts.Jason Riedy, Jan 16, 2007
  2. Junio C HamanoJan 16, 2007
  3. Jason RiedyJan 16, 2007
  4. Eric BlakeJan 16, 2007
  5. Horst H. von BrandJan 17, 2007
  6. Junio C HamanoJan 17, 2007
  7. Brian GernhardtJan 17, 2007
  8. Julian PhillipsJan 17, 2007
  9. Horst H. von BrandJan 17, 2007
  10. Simon 'corecode' SchubertJan 18, 2007
  11. Junio C HamanoJan 18, 2007

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.