Solved

wget from local directory

Posted on 2013-05-31
3
291 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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now