I'm very new to Ubuntu and scripting. I am a Windows sysadmin. I need to schedule a .csv download once a day for my job.
First I tried to use the windows version of WGET and had was able to create this script but when using windows Task Scheduler it wouldn't work. I think maybe it had a problem with the script trying to run too fast and not allowing it to authenticate (just a guess).
F:\Exports\WGET\wget.exe -O F:\Exports\WGET\TEST\TEST_Export.csv "https://URLOMMITED" --no-check-certificate -r -P TEST
I couldn't figure it out so then I thought maybe I can install Ubuntu on a VM and give Ubuntu a shot since I know WGET is a linux command and have always wanted to use Ubuntu.
I opened gpedit and created this version of the script tested it on the Terminal by copy and paste and it works.
wget -O /home/gdadmin/Desktop/Exports/TEST.csv "https://URLOMMITED" --no-check-certificate
I saved it as test.sh on the Desktop and made it executable using:
chmod +x /home/gdadmin/Desktop/test.sh.
Then I tried opening the terminal to run the script:
bash: ./home/gdadmin/Desktop/qual.sh: No such file or directory
I'm reading that I may be missing dependencies but I'm not sure what to do. I am just trying turn it into a executable file so that I can then figure out how to schedule it. I am planning on reading about using Crontab but first I want to test it as a file so I can start trying to run it on Crontab.
Any guidance would be greatly appreciated!