mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-23 11:18:54 +00:00
4c8945a06b
dialog is distributed from GPLv2 to LGPLv2 and introduces a number of new features and a new and better libdialog API. The existing libdialog will be kept temporarily as libodialog for compatibility purposes until sade, sysinstall and tzsetup have been either updated or replaced. __FreeBSD_version is now 900030. Discussed on: -current Approved by: core Obtained from: http://invisible-island.net/dialog
24 lines
369 B
Bash
Executable File
24 lines
369 B
Bash
Executable File
#!/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
|