I wrote a simple script that cycles through a file and grabs some links from a file to run through a program called gallery-dl. This script works fine if i run it manually but just wont work with crontab or rc.local, ive tried everything i could think of and have found that while the script does run it doesn't actually download anything like its supposed to. I tested this by having the script create a random directory which worked but the actual download doesn't work when the script is called automaticly but it does when the script is called manually, i dont understand why it wont work when called through crontab or rc.local.
inline=$(echo '/home/pi/automation/gallery-dl-auto') #automation input file
outline=$(echo '/home/pi/downloaded/') #where the files download
cd $outline
while read line; do
gallery-dl $line;
sed -i '1d' $inline
done < $inline```