ls -a
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
while [ $select -lt 3 ]
do
if [ $select -eq 1 ]; then
echo "Do: rm $filename ?"
read yesorno
if [ "$yesorno" = "y" ]; then
rm -f $filename
fi
else
if [ $select -eq 2 ]; then
cat $filename
else
exit
fi
fi
ls -a
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
done
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
while [ $select -lt 3 ]
do
if [ $select -eq 1 ]; then
echo "Do: rm $filename ?"
read yesorno
if [ "$yesorno" = "y" ]; then
rm -f $filename
fi
else
if [ $select -eq 2 ]; then
cat $filename
else
exit
fi
fi
ls -a
echo "which file you want to operate ? "
read filename
echo "1. rm 2. cat 3.exit"
read select
done