[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] git-version-gen: remove cr as well
From: |
David A. Wheeler |
Subject: |
Re: [PATCH 4/4] git-version-gen: remove cr as well |
Date: |
Mon, 22 Sep 2014 12:03:24 -0400 (EDT) |
On Mon, 22 Sep 2014 09:22:07 -0600, Eric Blake <address@hidden> 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