|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/highlandlabs/cqi-bin/ALFA_DATA/alfasymlink/root/usr/tests/sys/cddl/zfs/bin/ |
Upload File : |
#!/usr/local/bin/ksh93 -p
#
cmd=$1
if [[ -z $cmd ]]; then
return 0
fi
shift
typeset option
case $cmd in
create|add|attach|detach|replace|remove|online|offline|clear)
for arg in $@; do
if [[ $arg == "/dev/"* ]]; then
arg=${arg#/dev/}
arg="/dev/"$arg
fi
if [[ $arg == "/dev/"* ]]; then
echo $arg | egrep "*s[0-9]$" > /dev/null 2>&1
if [ $? -eq 0 ]
then
n=`echo $arg| wc -c`
set -A map a b c d e f g h i j
s=`echo $arg | cut -c $((n-1))`
arg=${arg%s[0-9]}${map[$s]}
fi
fi
option="${option} $arg"
done
;;
*)
option="$@"
;;
esac
echo $cmd $option