#!/bin/bash cond=true while [ $cond == true ]; do if [ "$(ls /torrent)" == "" ]; then printf "No Torrents Found\n" break fi printf "Torrents:\n" ls /torrent/Complete/ printf "Remove all these Files?\n" read ans if [ "$ans" == "y" ]; then printf "Torrents Removed\n" cond=false rm -dr /torrent/Complete/* elif [ "$ans" == "n" ]; then printf "Nothing Removed\n" cond=false elif [ "$ans" == "s" ]; then printf "Remove Single Torrent or Group\n" read group if [ "$(ls /torrent/Complete/$group*)" == "" ]; then printf "Nothing Found\n" sleep 1 else ls /torrent/Complete/$group* printf "Remove?\n" read ans if [ "$ans" == "y" ]; then rm -dr /torrent/complete/$group* cond=false printf "Torrents Removed\n" elif [ "$ans" == "n" ]; then printf "Nothing Removed\n" cond=false fi fi fi done