Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Start a for loop after youtube-dl is finished #17618
Comments
|
You don't need any scripts for that. Use |
i want to check for new videos in a youtube channel every day, i use cron to do that. at the moment i start youtube-dl directly from the cron. i want to delete some strings from the file name and created a shell script thats checks the files in the downloader folder. the cron now should start a shell script that
1.) checks for new files and downloas them if available
2.) rename new files in the output folder
but when i start the shell script manually the for loop starts before youtube-dl starts. i execute the script and get the error that there are no files to rename, then it jumps back to the terminal prompt. after a few moments youtube-dl starts checking for new videos and download videos if available.
how can i ensure that the for loop only starts after youtube-dl is finished, no matter how long youtube-dl needs. a simple 'sleep' should not enough because i can't say how long the downloads needs.