某些站会改tracker,所以需要批量更改已有种子的tracker
#!/bin/bash
username="yaoge123"
password="yaoge123"
host="localhost:9091"
for i in $(transmission-remote $host -n $username:$password -l|awk '{print $1}'|grep -o -P '\d+')
do
out=$(transmission-remote $host -n $username:$password -t $i -it|grep $1)
if [ -n "$out" ];then
id=$(echo "$out"|awk -F: '{print $1}'|grep -o -P '\d+')
echo $i
transmission-remote $host -n $username:$password -t $i -tr $id
transmission-remote $host -n $username:$password -t $i -td $2
fi
done
用法:./chtracker.sh https://old.tracker.com https://new.tracker.com/announce.php?passkey=xxxxxxxxxx
请问如何批量自动给任务添加tracker呀
-td 是加tracker
请问如何一次性添加多行Tracker呢? 脚本应该怎么写?
多写几行 transmission-remote $host -n $username:$password -t $i -td ……
没看明白啊