将sed引号加回去

This commit is contained in:
lsy 2024-09-23 13:34:53 +08:00
parent 86e051a714
commit 4046e894ff
2 changed files with 5 additions and 5 deletions

View File

@ -105,18 +105,18 @@ EOF
if [[ $local_pick == [Yy] ]];then if [[ $local_pick == [Yy] ]];then
echo "本地备份路径:${web_path}/年份/目录名称" echo "本地备份路径:${web_path}/年份/目录名称"
else else
sed -i /mkdir.*/d "${path}/backup.sh" sed -i '/mkdir.*/d' "${path}/backup.sh"
fi fi
if [[ $baidu_pick == [Nn] ]];then if [[ $baidu_pick == [Nn] ]];then
sed -i /bypy.*/d "${path}/backup.sh" sed -i '/bypy.*/d' "${path}/backup.sh"
sed -i /source.*/d "${path}/backup.sh" sed -i '/source.*/d' "${path}/backup.sh"
else else
echo "百度网盘备份路径:我的应用数据/bypy/目录名称" echo "百度网盘备份路径:我的应用数据/bypy/目录名称"
fi fi
if [[ $baidu_pick == [Nn] ]];then if [[ $baidu_pick == [Nn] ]];then
sed -i /.*aliyunpan.*/d "/var/script/backup.sh" sed -i '/.*aliyunpan.*/d' "/var/script/backup.sh"
else else
echo "阿里云盘备份路径:网盘/目录名称/日期" echo "阿里云盘备份路径:网盘/目录名称/日期"
fi fi

View File

@ -14,7 +14,7 @@ tar -zxf "$path/aa" -C $path
rm "$path/aa" rm "$path/aa"
chmod +x "$path/linuxtool/Run.sh" chmod +x "$path/linuxtool/Run.sh"
sed -i /alias tool.*/d "${HOME}/.bashrc" sed -i '/alias tool.*/d' "${HOME}/.bashrc"
echo "alias tool=$path/linuxtool/Run.sh" | cat >> "${HOME}/.bashrc" echo "alias tool=$path/linuxtool/Run.sh" | cat >> "${HOME}/.bashrc"
source "${HOME}/.bashrc" source "${HOME}/.bashrc"