Use printf rather than echo -n.

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.

[jc: futureproofed two instances that uses variable with '%s'
 so later feeding different messages would not break things too
 easily; others are emitting literal so whoever changes the
 literal ought to notice more easily so they are safe.]

Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Jason Riedy
2005-12-06 14:21:52 -08:00
committed by Junio C Hamano
parent e23eff8be9
commit 9754563ca9
4 changed files with 5 additions and 5 deletions

View File

@@ -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;;