summaryrefslogtreecommitdiffstats
path: root/regress/keygen-knownhosts.sh
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-01-27 13:01:36 +0100
committerDamien Miller <djm@mindrot.org>2015-01-27 13:03:15 +0100
commite56aa87502f22c5844918c10190e8b4f785f067b (patch)
treee541b223447a68e0132079ee39fe243877ec11fc /regress/keygen-knownhosts.sh
parentupstream commit (diff)
downloadopenssh-e56aa87502f22c5844918c10190e8b4f785f067b.tar.xz
openssh-e56aa87502f22c5844918c10190e8b4f785f067b.zip
upstream commit
use printf instead of echo -n to reduce diff against -portable
Diffstat (limited to 'regress/keygen-knownhosts.sh')
-rw-r--r--regress/keygen-knownhosts.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/regress/keygen-knownhosts.sh b/regress/keygen-knownhosts.sh
index 35a5ea499..085aac650 100644
--- a/regress/keygen-knownhosts.sh
+++ b/regress/keygen-knownhosts.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: keygen-knownhosts.sh,v 1.1 2015/01/18 22:00:18 djm Exp $
+# $OpenBSD: keygen-knownhosts.sh,v 1.2 2015/01/27 12:01:36 djm Exp $
# Placed in the Public Domain.
tid="ssh-keygen known_hosts"
@@ -13,13 +13,13 @@ for x in host-a host-b host-c host-d host-e host-f host-a2 host-b2; do
echo "# $x" >> $OBJ/kh.hosts
(
case "$x" in
- host-a|host-b) echo -n "$x " ;;
- host-c) echo -n "@cert-authority $x " ;;
- host-d) echo -n "@revoked $x " ;;
- host-e) echo -n "host-e* " ;;
- host-f) echo -n "host-f,host-g,host-h " ;;
- host-a2) echo -n "host-a " ;;
- host-b2) echo -n "host-b " ;;
+ host-a|host-b) printf "$x " ;;
+ host-c) printf "@cert-authority $x " ;;
+ host-d) printf "@revoked $x " ;;
+ host-e) printf "host-e* " ;;
+ host-f) printf "host-f,host-g,host-h " ;;
+ host-a2) printf "host-a " ;;
+ host-b2) printf "host-b " ;;
esac
cat $OBJ/kh.${x}.pub
# Blank line should be preserved.
@@ -47,7 +47,7 @@ expect_key() {
test "x$_mark" = "xREVOKED" && _marker="@revoked "
test "x$_line" != "x" &&
echo "# Host $_host found: line $_line $_mark" >> $OBJ/kh.expect
- echo -n "${_marker}$_hosts " >> $OBJ/kh.expect
+ printf "${_marker}$_hosts " >> $OBJ/kh.expect
cat $OBJ/kh.${_key}.pub >> $OBJ/kh.expect ||
fatal "${_key}.pub missing"
}