Blocklist-Update.sh is a script that I wrote to manage blocklists from bluetack etc to be used in conjunction with Transmission torrent downloader in Linux/MacOS. The script can be taylored to work with Qbittorrent as well, but the placement of the blocklists means you'd have to redirect the blocklist to go somewhere locally manageable as Transmission uses its own blocklist directory in .config. I believe there are about 10 lists there now. It works well for my needs. It can be ran weekly using crontab in standard user profile. To download: blocklist-update.sh To download the others: Github
While loops or Do While loops are loops that, based on a condition,
will loop through a list of data. While loops are good for listing
several names at once or continually running an application through a
loop to gather complete user input and data in order to store that
information in variables for later use. While loops are common in
Bash, Python and all kinds of programming languages, and unlike Until
loops, they can run indefinitely. While loops are discernible from
For loops in how they operate, however, sometimes scenarios can be
skewed where both might seem to fill a need. It can often be
confusing at times for beginners to programming. However, While loops
are more flexible and can handle boolean values really well. A couple
of examples of while loops are as follows:
while TRUE
do
command
FALSE
done
n=0
while [ $n -lt 7 ];
do
command
n=$n+1
sleep 1
done
while [ $? -eq 0 ];
do
command1
command2
command3
break
done
As you can clearly see, I added a break on the last one to end the
loop. I did the same with the first by changing the condition
statement to FALSE. The second one didn’t need a break as it only
ran a set number of times. And the sleep command, well it pauses
before each iteration of the loop. I had trouble with While loops for
a long time, but I finally started to understand them. You will too!
Just practice.
Comments
Post a Comment