diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-04-18 23:55:14 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-04-18 23:55:14 +0000 |
commit | bfc7f4198b073b26227ae3722d031e1fa32ec10a (patch) | |
tree | aa59e23b6035a07b2e14b648fe434b15335e49ee /libc/scripts | |
parent | 1aab636c1bf39a768891da3abcb72fac07e25329 (diff) | |
download | eglibc2-bfc7f4198b073b26227ae3722d031e1fa32ec10a.tar.gz |
* scripts/cross-test-ssh.sh: Use printf in place of echo.
git-svn-id: svn://svn.eglibc.org/trunk@2017 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/scripts')
-rwxr-xr-x | libc/scripts/cross-test-ssh.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libc/scripts/cross-test-ssh.sh b/libc/scripts/cross-test-ssh.sh index 1e4ffd445..ba8e3863d 100755 --- a/libc/scripts/cross-test-ssh.sh +++ b/libc/scripts/cross-test-ssh.sh @@ -76,7 +76,7 @@ host="$1"; shift # Return all input as a properly quoted Bourne shell string. bourne_quote () { - echo -n '"' + printf '%s' '"' sed -n \ -e '1h' \ -e '2,$H' \ @@ -84,7 +84,7 @@ bourne_quote () { s/["$\`]/\\&/g p }' - echo -n '"' + printf '%s' '"' } # Echo all lines of input except those starting with 'export VAR=', @@ -109,8 +109,8 @@ exports="$(export -p | blacklist_exports)" # Transform the current argument list into a properly quoted Bourne shell # command string. command="$(for word in "$@"; do - echo -n "$word" | bourne_quote - echo -n ' ' + printf '%s' "$word" | bourne_quote + printf '%s' ' ' done)" # Add commands to set environment variables and the current directory. @@ -122,4 +122,4 @@ ${command}" # passes them to some shell. We want to force the use of /bin/sh, # so we need to re-quote the whole command to ensure it appears as # the sole argument of the '-c' option. -$ssh "$host" /bin/sh -c "$(echo "${command}" | bourne_quote)" +$ssh "$host" /bin/sh -c "$(printf '%s\n' "${command}" | bourne_quote)" |