Re: Bug: git-rebase goofs up \n in commit messages
- From
- Herbert Xu <herbert@gondor.apana.org.au>
- Date
- May 26, 2007, 06:19 UTC
- Message-ID
- <20070526061942.GA5986@gondor.apana.org.au>
- In-Reply-To
- <20070526060748.GA20715@coredump.intra.peff.net>
On Sat, May 26, 2007 at 02:07:48AM -0400, Jeff King wrote:
Show 7 quoted lines
> > > - echo "$commit_only" | > > + printf "%s\n" "$commit_only" | > > Is "\n" portable to all shells (i.e., do you need '\n')? It works with > bash and dash, which are by far the most common, but who knows what evil > lurks in the heart of Sun?
You mean the "\n" in printf? Yes that is specified in POSIX. Without the "\n" printf will act like echo -n (which incidentally is forbidden by POSIX).
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt