aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/xzmore.in
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2022-07-18 19:18:48 +0300
committerLasse Collin <lasse.collin@tukaani.org>2022-07-24 11:38:19 +0300
commit4a61867a874c60b31448d2d4f3c276efba85a243 (patch)
tree5f343d42ddd9989c18c4c59fa04f78c686bdb0eb /src/scripts/xzmore.in
parentxzgrep: Add more LC_ALL=C to avoid bugs with multibyte characters. (diff)
downloadxz-4a61867a874c60b31448d2d4f3c276efba85a243.tar.xz
Scripts: Use printf instead of echo in a few places.
It's a good habbit as echo has some portability corner cases when the string contents can be anything.
Diffstat (limited to 'src/scripts/xzmore.in')
-rw-r--r--src/scripts/xzmore.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scripts/xzmore.in b/src/scripts/xzmore.in
index ea832a30..6ba1344d 100644
--- a/src/scripts/xzmore.in
+++ b/src/scripts/xzmore.in
@@ -31,8 +31,8 @@ Like 'more', but operate on the uncompressed contents of xz compressed FILEs.
Report bugs to <@PACKAGE_BUGREPORT@>."
case $1 in
- --help) echo "$usage" || exit 2; exit;;
- --version) echo "$version" || exit 2; exit;;
+ --help) printf '%s\n' "$usage" || exit 2; exit;;
+ --version) printf '%s\n' "$version" || exit 2; exit;;
esac
oldtty=`stty -g 2>/dev/null`
@@ -50,7 +50,7 @@ fi
if test $# = 0; then
if test -t 0; then
- echo "$usage"; exit 1
+ printf '%s\n' "$usage"; exit 1
else
$xz -cdfq | eval "${PAGER:-more}"
fi
@@ -69,7 +69,7 @@ else
esac
fi
if test "$ANS" != 's'; then
- echo "------> $FILE <------"
+ printf '%s\n' "------> $FILE <------"
$xz -cdfq -- "$FILE" | eval "${PAGER:-more}"
fi
if test -t 1; then