#!/bin/bash
function copy()
{
read -p "please input your old_file:" old_file
read -p "please input your new_file:" new_file
cp -r $old_file $new_file
if [ $? -eq 0 ];then
echo "copy success!"
fi
sleep 1
}
function rename()
{
read -p "please input your old_file:" old_file
read -p "please input your new_file:" new_file
mv $old_file $new_file
if [ $? -eq 0 ];then
echo "rename success!"
fi
sleep 1
}
function remove()
{
read -p "please input you want to delete file or dir:" old_file
rm -rf $old_file
if [ $? -eq 0 ];then
echo "delete success!"
fi
sleep 1
}
function find_file()
{
read -p "please input the file you want to find:" old_file
find $PWD/ -name $old_file
if [ $? -eq 0 ];then
shell脚本之菜单
最新推荐文章于 2024-04-21 10:09:44 发布
![](https://img-home.csdnimg.cn/images/20240611030827.png)