case "$1"
in
[a-z]) : ;;
[0-9]) : ;;
[A-Z]) : ;;
?) more ;;
*) :;;
esac
if [ "$#" -eq 0 ]
then
echo -n "rm: missing operand
Try ‘rm –help’ for more informaction.
"
fi
if [ "$#" -eq 1 ]
then
case "$from1"
in
-i) echo "Try ‘rm –help’ for more informaction."; break ;;
-f) echo "Try ‘rm –help’ for more informaction."; break ;;
-r) echo "Try ‘rm –help’ for more informaction."; break ;;
-l) rml ;;
–help) help;;
*) rm1;;
esac
fi
if [ "$#" -eq 2 ]
then
case "$from1"
in
-i) rmi ;;
-f) rmf ;;
-r) rmr ;;
-l) rml ;;
-rf) rmr ;;
–help) help ;;
esac
fi
if [ "$#" -gt 2 ]
then
for file in $*
do
mv $file "$home/"
done 2> /dev/null
fi
[/code]
(编辑:ASP站长网)
|