On Wed, Oct 24, 2012 at 09:12:27PM -0400, W. Trevor King wrote:
> On Wed, Oct 24, 2012 at 02:12:18PM -0400, Phil Hord wrote:
> > + VAR_NAME=$(printf '%s'
> > "$VAR_NAME" | tr A-Z a-z | sed -e 's/^[^a-z]/_/' -e 's/[^a-z0-9]/_/g')
> Is there a reason why you use printf instead of echo?
Sadly, echo is not entirely portable for arbitrary content. We have run
into problems with backslashes being interpreted differently (bash
requires "echo -e" to interpret them, dash will always do it, and POSIX
leaves it vague).
> Also, this sort of name cleaning should probably live in a new
> or some such. Is there a git-utility-functions.sh library hiding
> somewhere in the source? ;)
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html