|
From: | Paul Eggert |
Subject: | Re: [PATCH 03/21] git-version-gen: remove CR as well |
Date: | Sun, 30 Nov 2014 08:41:03 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |