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

Re: [PATCH] t5701: "wc -l" may add whitespace

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Aug 29, 2007, 16:55 UTC
Message-ID
<vpqbqcqi8km.fsf@bauges.imag.fr>
In-Reply-To
<Pine.LNX.4.64.0708291752050.28586@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> -	linked=$(find objects -type f ! -links 1 | wc -l) &&
> -	test "$linked" = 0
> +	test $(find objects -type f ! -links 1 | wc -l) = 0
You can also use "test x -eq y" to compare integers.
I don't know which one is the most portable.
-- 
Matthieu
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 2 of 5 in “t5701: "wc -l" may add whitespace”
  1. t5701: "wc -l" may add whitespaceJohannes Schindelin, Aug 29, 2007
  2. Matthieu MoyAug 29, 2007
  3. Johannes SchindelinAug 29, 2007
  4. Junio C HamanoAug 30, 2007
  5. Johannes SchindelinAug 30, 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.