#! /bin/bash
read -p "If you want to clean the trash?(y/n):" select
str=yif [ "$select" = "y" ]
then
rm -fr $HOME/.local/share/Trash/files/*
echo "Deleted successfully!"
else
echo "Undelete!"
fi
注意的几点:
1、if和[ ]之间要空格。
2、[ ]和“ ”之间要空格
3、“ ”和=之间要空格,