Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

wget from local directory

Posted on 2013-05-31
3
Medium Priority
?
338 Views
Last Modified: 2013-06-06
Greetings,
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?
ie.
wget /var/tmp/file1.htm

Thanks
0
Comment
Question by:Evan Cutler
  • 2
3 Comments
 
LVL 23

Expert Comment

by:nemws1
ID: 39211265
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.
0
 
LVL 23

Accepted Solution

by:
nemws1 earned 2000 total points
ID: 39211280
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

0
 
LVL 9

Author Closing Comment

by:Evan Cutler
ID: 39225928
That'll work.
Thanks.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question