From: Jason Riedy <ejr@EECS.Berkeley.EDU>
To: git@vger.kernel.org
Subject: [PATCH] Use printf rather than echo -n.
Date: Tue, 06 Dec 2005 14:21:52 -0800 [thread overview]
Message-ID: <20512.1133907712@lotus.CS.Berkeley.EDU> (raw)
On AIX, there is no -n option to the system's echo. Instead,
it needs the '\c' control character. We could replace
echo -n "foo"
with
echo -e "foo\c"
but printf is recommended by most man pages. Tested on AIX
5.3, Solaris 8, and Debian.
Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu>
---
git-am.sh | 2 +-
git-applypatch.sh | 2 +-
git-bisect.sh | 2 +-
git-status.sh | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
58ad3dda17daa0577fda5204f75bbc846cf7d7ea
diff --git a/git-am.sh b/git-am.sh
index 660b3a4..6ed527c 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -312,7 +312,7 @@ do
echo "--------------------------"
cat "$dotest/final-commit"
echo "--------------------------"
- echo -n "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+ printf "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
read reply
case "$reply" in
[yY]*) action=yes ;;
diff --git a/git-applypatch.sh b/git-applypatch.sh
index 4c577eb..a112e1a 100755
--- a/git-applypatch.sh
+++ b/git-applypatch.sh
@@ -83,7 +83,7 @@ while [ "$interactive" = yes ]; do
echo "--------------------------"
cat "$final"
echo "--------------------------"
- echo -n "Apply? [y]es/[n]o/[e]dit/[a]ccept all "
+ printf "Apply? [y]es/[n]o/[e]dit/[a]ccept all "
read reply
case "$reply" in
y|Y) interactive=no;;
diff --git a/git-bisect.sh b/git-bisect.sh
index 68838f3..05dae8a 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -67,7 +67,7 @@ bisect_start() {
rm -rf "$GIT_DIR/refs/bisect/"
mkdir "$GIT_DIR/refs/bisect"
{
- echo -n "git-bisect start"
+ printf "git-bisect start"
sq "$@"
} >"$GIT_DIR/BISECT_LOG"
sq "$@" >"$GIT_DIR/BISECT_NAMES"
diff --git a/git-status.sh b/git-status.sh
index b90ffc1..bf0e66c 100755
--- a/git-status.sh
+++ b/git-status.sh
@@ -13,7 +13,7 @@ report () {
trailer=""
while read status name newname
do
- echo -n "$header"
+ printf "$header"
header=""
trailer="#
"
@@ -27,7 +27,7 @@ report () {
U ) echo "# unmerged: $name";;
esac
done
- echo -n "$trailer"
+ printf "$trailer"
[ "$header" ]
}
--
0.99.9.GIT
next reply other threads:[~2005-12-06 22:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-06 22:21 Jason Riedy [this message]
2005-12-07 2:04 ` [PATCH] Use printf rather than echo -n Junio C Hamano
2005-12-07 3:31 ` Jason Riedy
-- strict thread matches above, loose matches on Subject: below --
2005-12-08 8:02 linux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20512.1133907712@lotus.CS.Berkeley.EDU \
--to=ejr@eecs.berkeley.edu \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).