- 论坛徽章:
- 0
|
#! /bin/sh
# DSCRIPTION: Instead of shell command "rm" and "mv"
# DATE: July 15, 2009
# flyeee at hotmail dot com
CUR_VERSION=0.2
OPTION=.2
if [ ! $1 ]; then
echo "Usage: rmf arg('-f') file";
exit 1;
else
if [ $1 = '--help' ]; then
echo "rmf arg('-f') file";
else
if [ $1 = '--version' ] || [ $1 = '-V' ]; then
echo "rmf:" $CUR_VERSION;
else
if [ ! $2 ]; then
echo "rmf arg('-f') file";
exit 1;
else
if [ $1 = '-f' ]; then
echo "Are you sure remove it?"
read getvalue1;
if [ $getvalue1 = 'yes' ]; then
if [ -e /tmp/$2 ]; then
mv $2 /tmp/$2$OPTION;
else
mv $2 /tmp/;
fi
fi
fi
fi
fi
fi
fi |
|