#!/bin/bash/ ###################### #### START CONFIG #### ###################### tmpDir=../tmp/ ###################### #### END CONFIG ###### ###################### cd $tmpDir if [ -f task.lock ]; then exit fi touch task.lock for file in $tempDest*.request do if [ -f $tmpDir/$file ]; then while IFS=';' read url finalPath do echo $url echo $finalPath youtube-dl -c --write-thumbnail --write-sub --sub-lang fr --write-info-json --no-check-certificate -f "[height <=?720]" -o $finalPath"%(title)s.%(ext)s" "$url" done < $file rm $file fi done rm task.lock