summaryrefslogtreecommitdiff
path: root/Build/source/utils/dialog/dialog-1.1-20080819/samples/rotated-data
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/dialog/dialog-1.1-20080819/samples/rotated-data')
-rwxr-xr-xBuild/source/utils/dialog/dialog-1.1-20080819/samples/rotated-data23
1 files changed, 23 insertions, 0 deletions
diff --git a/Build/source/utils/dialog/dialog-1.1-20080819/samples/rotated-data b/Build/source/utils/dialog/dialog-1.1-20080819/samples/rotated-data
new file mode 100755
index 00000000000..dc407144e7e
--- /dev/null
+++ b/Build/source/utils/dialog/dialog-1.1-20080819/samples/rotated-data
@@ -0,0 +1,23 @@
+#!/bin/sh
+# $Id: rotated-data,v 1.1 2004/12/19 16:43:47 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`
+ shift 1
+ ;;
+ *)
+ left=1
+ next=2
+ ;;
+ esac
+ char=`echo "$@" | cut -b -${left}`
+ data=`echo "$@" | cut -b ${next}-`
+
+ printf "%s%s\n" $data $char
+else
+ echo
+fi