[root@localhost wyb]# cat zonghe.sh
#!/bin/bash
#zonghe
usage(){
case $choice in
)
read -p "please input the old file and new file : " old_file new_file
cp -r $old_file $new_file
if [ $? -eq ];then
echo "success!" >&
fi
sleep
;; )
read -p "please input the file and newname : " file newname
mv $file $newname
if [ $? -eq ] ;then
echo "success!" >&
fi
sleep
;; )
read -p "please input the file or dir you wanna del : " filename
rm -rf $filename
if [ $? -eq ];then
echo "success!" >&
fi
sleep
;; )
read -p "please input the file you wanna find : " file
find / -name $file
if [ $? -eq ];then
echo "success!" >&
fi
sleep
;; )
exit
;; *)
;; esac } while : do cat<<EOF
*************************************
* MENU * * .copy .rename * * .remove .find * * .exit * *************************************
EOF read -p "please enter your choice : " choice usage done