Hi/2. Paul Eggert wrote: > Sorry, I forgot to CC: this one to you. > > > -------- Forwarded Message -------- > Subject: Re: [PATCH 03/21] git-version-gen: remove CR as well > Date: Sun, 30 Nov 2014 08:41:03 -0800 > From: Paul Eggert <egg...@cs.ucla.edu> > Organization: UCLA Computer Science Department > To: bug-gnulib@gnu.org > > KO Myung-Hun wrote: >> +echo "$v" | tr -d "$cr$nl" > > How about this instead? > > printf '%s' "$v" > > This avoids the need for cr and for tr, which is simpler and a bit > faster. The > script is already using printf so this shouldn't be a portability issue. >
Yes, it works. Thanks. -- KO Myung-Hun Using Mozilla SeaMonkey 2.7.2 Under OS/2 Warp 4 for Korean with FixPak #15 In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM Korean OS/2 User Community : http://www.ecomstation.co.kr
From 15c05c5a69c0d10f67e4d40f6fadefabe3f488d2 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun <k...@chollian.net> Date: Mon, 29 Oct 2012 18:30:04 +0900 Subject: [PATCH] git-version-gen: do not print new line characters * build-aux/git-version-gen: Use printf instead of echo and tr. --- build-aux/git-version-gen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen index 47d6576..0dd6f7c 100755 --- a/build-aux/git-version-gen +++ b/build-aux/git-version-gen @@ -215,7 +215,7 @@ if test "x$v_from_git" != x; then fi # Omit the trailing newline, so that m4_esyscmd can use the result directly. -echo "$v" | tr -d "$nl" +printf '%s' "$v" # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) -- 1.8.5.2