remove finished torrents (bash script)
Posted: Sun Oct 23, 2011 7:49 am
I just made myself a script to remove finished torrents, perhaps more people find it useful.
PS. I know this can also be done quite easily using the web interface.
Code: Select all
#!/bin/sh
FINISHED=`transmission-remote -l | grep " Finished "`
IDS=`echo "$FINISHED" | awk -v ORS=',' '{print $1}'`
CMD="transmission-remote -t$IDS -r"
echo "$FINISHED"
echo "$CMD"
read -r -n1 -p "Remove above torrents ? [Y/n]" RSP
RSP=${RSP,,} # tolower
if [ "$RSP" == "" -o "$RSP" = "y" ]
then
$CMD
fi