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

Re: [PATCH] Replace perl code with pure shell code

From
Nikolai Weibull <now@bitwi.se>
Date
Jan 29, 2007, 12:38 UTC
Message-ID
<dbfc82860701290438y4e00cc05s5f8c8acdc8022768@mail.gmail.com>
In-Reply-To
<86zm82dpql.fsf@blue.stonehenge.com>
On 1/29/07, Randal L. Schwartz <merlyn@stonehenge.com> wrote:
Show 6 quoted lines
> >>>>> "Simon" == Simon 'corecode' Schubert <corecode@fs.ei.tum.de> writes:
>
> Simon> +                        destname="refs/$branch_top/${name#refs/heads/}" ;;
>
> I don't think this is portable shell.  At least Perl is the same everywhere.
> Ignore me if this is a shell syntax on something other than bash.
According to "The Open Group Base Specifications Issue 6" [1]:
${parameter#word}
    Remove Smallest Prefix Pattern. The word shall be expanded to
produce a pattern. The parameter expansion shall then result in
parameter, with the smallest portion of the prefix matched by the
pattern deleted.
We do require a POSIX-compliant version of sh already, right?
  nikolai
[1] http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_02
Previous: Randal L. SchwartzNext: Randal L. Schwartz
Message 6 of 12 in “Replace perl code with pure shell code”
  1. Replace perl code with pure shell codeSimon 'corecode' Schubert, Jan 29, 2007
  2. Junio C HamanoJan 29, 2007
  3. Replace perl code with pure shell codeSimon 'corecode' Schubert, Jan 29, 2007
  4. Shawn O. PearceJan 29, 2007
  5. Randal L. SchwartzJan 29, 2007
  6. Nikolai WeibullJan 29, 2007
  7. Randal L. SchwartzJan 29, 2007
  8. Nikolai WeibullJan 29, 2007
  9. Randal L. SchwartzJan 29, 2007
  10. Junio C HamanoJan 30, 2007
  11. Jakub NarebskiJan 29, 2007
  12. Randal L. SchwartzJan 29, 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.