I have the following command:
Code:
#!/bin/bash
name=$(cat "/home/mydir/URLs.txt")
echo
echo $name
echo
youtube-dl -o /home/mydir/downloads/youtube-dl/'%(title)s'.flv -x --audio-format mp3 --audio-quality 320 -k --embed-subs $name
etc.
I'm looking for a way to remove each line in $name after it is
successfully processed. I didn't see something like that as a function of a youtube-dl switch, so I'm wondering how I can do this in bash?
Would it work to follow the youtube-dl command with
Code:
&& $name | sed -e '1d'
But even if this works, it doesn't necessarily verify the file correctly downloaded. I'd greatly appreciate any feedback on this.
Thanks!!