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

Re: [PATCH] Shell utilities: Guard against expr' magic tokens.

From
Junio C Hamano <junkio@cox.net>
Date
Apr 13, 2006, 23:39 UTC
Message-ID
<7vodz5vyd6.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<slrne3tihk.1dq.mdw@metalzone.distorted.org.uk>
Mark Wooding <mdw@distorted.org.uk> writes:
Show 5 quoted lines
> From: Mark Wooding <mdw@distorted.org.uk>
>
> Some words, e.g., `match', are special to expr(1), and cause strange
> parsing effects.  Track down all uses of expr and mangle the arguments
> so that this isn't a problem.
Gaaaaaaaaaah.  
    http://www.opengroup.org/onlinepubs/009695399/utilities/expr.html

says use of length, substr, index, match as string arguments produces unspecified results, so obviously the program was wrong.

Thanks.
Previous: Mark WoodingNext: Junio C Hamano
Message 2 of 3 in “Shell utilities: Guard against expr' magic tokens.”
  1. Shell utilities: Guard against expr' magic tokens.Mark Wooding, Apr 13, 2006
  2. Junio C HamanoApr 13, 2006
  3. Fix-up previous expr changes.Junio C Hamano, Apr 14, 2006

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.