aboutsummaryrefslogtreecommitdiff
path: root/samples/rotated-data
diff options
context:
space:
mode:
Diffstat (limited to 'samples/rotated-data')
-rwxr-xr-xsamples/rotated-data6
1 files changed, 3 insertions, 3 deletions
diff --git a/samples/rotated-data b/samples/rotated-data
index dc407144e7e3..28e3f650f753 100755
--- a/samples/rotated-data
+++ b/samples/rotated-data
@@ -1,12 +1,12 @@
#!/bin/sh
-# $Id: rotated-data,v 1.1 2004/12/19 16:43:47 tom Exp $
+# $Id: rotated-data,v 1.2 2019/12/10 23:59:24 tom Exp $
# Rotate the second parameter's data by the given shift count.
if test $# != 0
then
case $1 in
[1-9]*)
left=$1
- next=`expr $left + 1`
+ next=`expr "$left" + 1`
shift 1
;;
*)
@@ -17,7 +17,7 @@ then
char=`echo "$@" | cut -b -${left}`
data=`echo "$@" | cut -b ${next}-`
- printf "%s%s\n" $data $char
+ printf "%s%s\n" "$data" "$char"
else
echo
fi