Re: [PATCH 4/4] git-version-gen: remove cr as well

"David A. Wheeler" <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.patches,gmane.comp.lib.gnulib.bugs
Message-ID <[email protected]>
On Mon, 22 Sep 2014 09:22:07 -0600, Eric Blake <[email protected]> wrote:
> Sadly, this won't work.  There's no easily portable way to specify a raw
> carriage return in scripting

If your system has printf (which is in POSIX and widely supported),
you could do this to set variable "cr" to carriage return (since printf supports \r):

cr=$(printf '\rX')
cr="${cr%X}"

--- David A. Wheeler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.