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:


I get:

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!

  • so you typed test.sh and it responded no such file or directory qual.sh? – JD Schmidt Jan 30 '15 at 2:40
  • 4
    You are trying to refer to an absolute path /home/gdadmin/Desktop/qual.sh but are prepending . so that the system is looking for /home/gdadmin/Desktop/qual.sh relative to your current directory. – steeldriver Jan 30 '15 at 2:43
  • 1
    @steeldriver do post that as an answer. – muru Feb 2 '15 at 15:52

Stop! Hold your horses!

You've installed a VM tu run one single command? Windows is a fully compliant POSIX OS (meaning: it's "kind of compatible" with Unix) and you don't need a VM for that!

Your problem is the https:// and using --no-certificate is not going to cut it if that server needs log-in information! So the URL OMITTED is actually needed to help you find a satisfying solution, as the wget manual clearly states.

So you need to give more information or figure out yourself if the server needs certificates / keys / login information, ... to define the additional wget parameters you need to get the ssl/tls/... up and running so that wget can do its job...

(And you can make it fully work under Windows too, no Unix VM needed)

  • As you're a reputation 1 user: If this all works, don't forget to click the grey check-mark under the "0" at the left of this text, which means "yes, this answer is valid"! ;-) – Fabby Feb 2 '15 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.