Solved

wget from local directory

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

713 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