I'm working on a script that downloads large files like installers, youtube video series or torrents. It's supposed to work on a Raspbian. So the main part has to be delt with in a screen session. Or else the user would have to keep the ssh connection active all the time.
It's also supposed to get it's input from a textfile containing multiple entries like:
http://youtube.com/BlaBla video ~/Videos
http://vlc-project.org/downloads/BlaBla file ~/Downloads
BlaBla.torrent torrent ~/Downloads
So the codeblock would be something like:
while read -r line; do
# Code for simple file
# Code for Video
# Code for torrent
done < "$inputFile"
How do I execute the entire while loop in a screen session? Is this even possible?
Greetings and thanks in advance
Markus
Screen man page mentions the following syntax:
And this:
So put your codeblock into a script , and launch from a terminal it like so