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-18 19:18:48 +0300
commitbad61b5997e6647911974022bfb72f3d4818a594 (patch)
tree77de708eaae140b4779e4598b4b0e2e39c865c4c /src/scripts/xzmore.in
parentxzgrep: Add more LC_ALL=C to avoid bugs with multibyte characters. (diff)
downloadxz-bad61b5997e6647911974022bfb72f3d4818a594.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