wget from local directory

In a production environment, I am pulling an html page using wget.

wget http://url.com/file.htm
no problem.

but in a development environment I am not allowed to get to the http.  They are manually dropping file.htm onto my server and expect me to code from there.

is there a way to wget from a local directory?
wget /var/tmp/file1.htm

Evan CutlerVolunteer Chief Information OfficerAsked:
Who is Participating?
nemws1Connect With a Mentor Database AdministratorCommented:
BTW - 'wget' does not support the file:// scheme, so this does not work:

wget -q -O test.htm file:///var/tmp/file1.htm

Open in new window

But 'curl' *does* support the file:// scheme, so this one does work:

curl -s file:///var/tmp/file1.htm > test.htm

Open in new window

nemws1Database AdministratorCommented:
I'm assuming this is in a shell script.

Can you just comment out the 'wget' line and put this on the next line instead:
cp /var/tmp/file1.htm .

Open in new window

You'll have to switch them back around when you copy to production.  Put that caveat in your release notes so you remember to do it when you go to deploy.
Evan CutlerVolunteer Chief Information OfficerAuthor Commented:
That'll work.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.