From: David Kastrup Date: Thu, 15 Nov 2007 10:14:56 GMT Subject: Re: [PATCH 1/3] git-bisect: war on "sed" Message-ID: <86hcjn4xy7.fsf@lola.quinscape.zz> In-Reply-To: <473C1A29.2010703@op5.se> Andreas Ericsson writes: >> Wincent Colaiuta writes: >>> + echo "${head#refs/heads/}" >"$GIT_DIR/head-name" > > It says "remove refs/heads/ from the beginning of the string pointed > to by $head". > > It's not a bashism. Some extensions to that syntax are though (I > think). General replace anywhere. > If you want to be sure of portability, use sed instead. Guffaw. > git uses this syntax often enough that it's worth using everywhere, > but usually only in porcelain commands which one can relatively > safely assume are run on at least decently up-to-date developer > workstations. Huh? It is used throughout. That's why "make install" will install xxx.sh scripts as xxx after possibly replacing the initial #!/bin/sh line with a shell known to be reasonably conformant on a particular system. -- David Kastrup