Sponsored Content
Top Forums Shell Programming and Scripting How to fetch File from a URL to Unix Server? Post 302542549 by raghunsi on Thursday 28th of July 2011 02:59:31 AM
Old 07-28-2011
The above password and Login is provided by the Service Provider in the same format. They have been edited for security purpose.

Currently i see the wget version 1.9. Please take a look.

Code:
$ pkginfo -l | grep -i wget
   PKGINST:  SMCwget
      NAME:  wget
   PKGINST:  SUNWwgetr
      NAME:  GNU wget - utility to retrieve files from the World Wide Web (root)
      DESC:  GNU wget - a utility to retrieve files from the World Wide Web (root components) 1.9.1
   PKGINST:  SUNWwgetu
      NAME:  wget - GNU wget
      DESC:  GNU wget - a utility to retrieve files from the World Wide Web (Usr) 1.9.1

Any idea how to use curl instead of wget to download the *.tar.gz file from the URL provided.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Modifying the URL to point to another location in a .sh UNIX file

Hello, I wanted to know how I could change my UNIX script to point to a URL location different from what I had specified earlier. For instance, in my shell script, I want to change the parameter for SMGR. Currently, SMGR = http://192.168.32.160:8084/Simmanr6 should be changed to SMGR =... (6 Replies)
Discussion started by: pjanakir
6 Replies

2. Shell Programming and Scripting

How to fetch data from a text file in Unix

I want to fetch passwords from a common file xxxx.txt and use it in a script. Currently the password is hardcoded so this have to be changed so that password can be fetched from text file..... Please reply asap.. Thanks (4 Replies)
Discussion started by: shikhakaul
4 Replies

3. UNIX for Advanced & Expert Users

Posting a file from Unix to URl

HI Can you please help me,how to post a xml file from Unix to URL. Basically,i want to map contents of my file at an url Regards Pooja (1 Reply)
Discussion started by: PoojaM
1 Replies

4. Shell Programming and Scripting

To Fetch a File From FTP server

Hi all, I need to download a file from ftp server through application server(UNIX server). Which only has sufficient privileges to connect to ftp server. And from that server( app server) i have to get that downloaded file in to my current UNIX server(working server where i am working). we... (5 Replies)
Discussion started by: dvk121
5 Replies

5. UNIX for Dummies Questions & Answers

open windows's .url file in unix

In windows, I can create a shortcut for websites. It's a .url file. the content of the file is like: How can I open it, the .url file, in firefox or google chrome in Unix(or just ubuntu)? (2 Replies)
Discussion started by: hz_i3
2 Replies

6. Shell Programming and Scripting

Need a script to fetch file from shared folder to unix box

Hi All, We have a requirement of pulling a file from shared folder to our unix box(Our application Servers). The Shared Folder and the servers are in teh same domain for eg UK domain For this purpose I got information like if in both source and destination ftp is enabled we can fetch the... (2 Replies)
Discussion started by: dhivya.enjoy
2 Replies

7. Shell Programming and Scripting

Fetch the different data by searching with a same variable from a file in AIX server

Hi, I am trying to fetch the different values in an xml file by searching with the same variable in AIX Server. <name>SharedResources/Shared/JNDI/Username</name> <value>admin</value> <name>SharedResources/Shared/JNDI/Username</name> ... (1 Reply)
Discussion started by: tejastrikez
1 Replies

8. Shell Programming and Scripting

Fetch Data from File using UNIX or Perl

Hello, How All are Doing today. I have a issue, I have a file which contains the data as follow <ENVELOPE><ENVELOPE_ID>TEST</ENVELOPE_ID><ENVELOPE_EXTERNAL_ID></ENVELOPE_EXTERNAL_ID><ENVELOPE_VERSION>2</ENVELOPE_VERSION><SIResourceDefaultVersion>true</SIResourceDefaultVersion><TYPE>GS... (1 Reply)
Discussion started by: adisky123
1 Replies

9. Shell Programming and Scripting

How to fetch values from a line in a file to variables in UNIX?

Hi, I need to assign values from a lines in a file into variables in unix, i am using Korn shell. I tried the below script from posts but i am unable to fetch every value in a variable. #! /usr/bin/ksh #for file in test.txt; do IFS=$'\|' I=1 while read -a val do echo... (15 Replies)
Discussion started by: karthikram
15 Replies

10. Shell Programming and Scripting

Reading URL using Mechanize and dump all the contents of the URL to a file

Hello, Am very new to perl , please help me here !! I need help in reading a URL from command line using PERL:: Mechanize and needs all the contents from the URL to get into a file. below is the script which i have written so far , #!/usr/bin/perl use LWP::UserAgent; use... (2 Replies)
Discussion started by: scott_cog
2 Replies
wwwoffle(1)						      General Commands Manual						       wwwoffle(1)

NAME
wwwoffle - A program to control the World Wide Web Offline Explorer. SYNOPSIS
wwwoffle -h | --help --version wwwoffle -online [-p <host>[:<port>] | -c <config-file>] wwwoffle -autodial [-p <host>[:<port>] | -c <config-file>] wwwoffle -offline [-p <host>[:<port>] | -c <config-file>] wwwoffle -fetch [-p <host>[:<port>] | -c <config-file>] wwwoffle -config [-p <host>[:<port>] | -c <config-file>] wwwoffle -dump [-p <host>[:<port>] | -c <config-file>] wwwoffle -cyclelog [-p <host>[:<port>] | -c <config-file>] wwwoffle -purge [-p <host>[:<port>] | -c <config-file>] wwwoffle -status [-p <host>[:<port>] | -c <config-file>] wwwoffle -kill [-p <host>[:<port>] | -c <config-file>] wwwoffle [-o|-O] [-p <host>[:<port>] | -c <config-file>] URL wwwoffle [-d[<depth>] | -r[<depth>] | -R[<depth>]] [-g[Sisfo]] [-F] [-p <host>[:<port>] | -c <config-file>] URL1 [URL2 [... URL]] wwwoffle [-d[<depth>] | -r[<depth>] | -R[<depth>]] [-g[Sisfo]] [-F] [-p <host>[:<port>] | -c <config-file>] file1 [file2 [... file]] wwwoffle -post [-p <host>[:<port>] | -c <config-file>] URL wwwoffle -put [-p <host>[:<port>] | -c <config-file>] URL DESCRIPTION
wwwoffle controls the World Wide Web Offline Explorer proxy HTTP server. The wwwoffle program is used to control the wwwoffled program, to tell it when the computer is online or offline, and which URLs to get and when to fetch them. The control options are also available from the server on an interactive control web page at http://localhost:8080/control/. OPTIONS
The command line options available for the program are described below. -h | --help A help message is printed giving a brief description of the usage of the program. --version The version number of the program is printed. -online Tell the wwwoffled proxy server that the computer is online to the internet and that requests are to be fetched immediately. -autodial Tell the wwwoffled proxy server that the computer can become online to the internet if required for requests that are not already cached, but that pages that are in the cache do not require any network access. This is intended for use with dial-on-demand sys- tems (using diald for example). -offline Tell the wwwoffled proxy server that the computer is not online to the internet and that requests are to be cached until they are fetched later. -fetch Tell the wwwoffled proxy server to fetch all of the requests that have been cached. (The proxy server must be online for this to work.) The program will wait until all of the requests have been met before exiting. -config Tell the wwwoffled proxy server to re-read the configuration file. -dump Tell the wwwoffled proxy server to dump out the current program configuration. This is equivalent to the most recently read config- uration file and the built-in default options. -cyclelog Tell the wwwoffled proxy server to close and then re-open the log file. -purge Tell the wwwoffled proxy server that the cache is to be purged. The configuration file wwwoffle.conf(5) specifies the maximum age of the pages to keep. If a maximum cache size is specified then the oldest pages are deleted until the size is not exceeded. -status Request from the wwwoffled proxy server the current status of the program. The online or offline mode, the fetch and purge sta- tuses, the number of current processes and their PIDs are displayed. -kill Tell the wwwoffled proxy server to exit cleanly at the next convenient point. URL The URL of a web page that is to be fetched. This is the same as using a browser and entering the URL if not already in the cache or pressing the refresh button in the index if it is in the cache. file The name of an HTML file that is to be parsed and the links in it are to be fetched as if the URLs had been specified on the command line. -o Fetch the specified URL (from the cache or request it if not already cached when offline, or get it when online) and output it on standard output. This is an easy way of getting an image out of the cache to be used in other programs. The contents of the Modi- fyHTML section of the configuration file are ignored and the unmodified data is output. -O Fetch the specified URL (from the cache or request it if not already cached when offline, or get it when online) and output it on standard output including the HTTP header. The contents of the ModifyHTML section of the configuration file are ignored and the unmodified data is output. -F Force the specified URLs to be refreshed. Without this option, the page will not be fetched unless newer than the version on the server. -r[<depth>] Causes the pages linked to by the specified URLs also to be fetched if they are on the same host. This recursion works for a number of links specified by the depth parameter, a depth of 0 means only the specified page, a depth of 2 means all linked pages and all links from them. -R[<depth>] The same as -r above, but it also works for links that are not on the same host. -d[<depth>] The same as -r above, but is limited to links in the same directory or a sub-directory. -gS Also fetches the stylesheets that are included in the specified URLs. -gi Also fetches the images that are included in the specified URLs. -gf Also fetches the frames that are included in the specified URLs. -gs Also fetches the scripts that are included in the specified URLs. -go Also fetches the objects that are included in the specified URLs. -post Create a request using the POST method, the data is read from stdin, and appended to the request. The user must ensure that the format of the data is valid for a POST request. Any of the characters '&', '=' or ';' that are not being used for their reserved purpose must be URL-encoded in the input, other characters will be URL-encoded. -put Create a request using the PUT method, the data is read from stdin and appended to the request. -c <config-file> Specifies the name of the configuration file that contains the server host name, port numbers and authorisation password. This is required for the -online, -autodial, -offline, -fetch, -config, -dump, -purge, -status and -kill options if a password is set. The user must have read access to the configuration file to be able to use the command if a password is set. (See the StartUp and LocalHost section of wwwoffle.conf(5) for more information on setting the server host name, ports and password.) -p <host>[:<port>] Sets the hostname and port number that is to be used for the connection to the proxy server. For the -online, -autodial, -offline, -fetch, -config, -dump, -purge, -status and -kill options this must be the WWWOFFLE control port, for the URL options it must be the WWWOFFLE HTTP proxy server port. If no -p option is specified then the compile-time defaults are used. When the -F , -R[<depth>] , -r[<depth>] , -d[<depth>] or -g[Sisfo] options are given then they will override the options that are set in the FetchOptions section of the configuration and not fetch any other contents of the specified URL. For example if the fetch options nor- mally include images and frames then using the -gi option will only fetch images and not frames. All page contents to be fetched must be specified as command line options. Specifying -g without any options will fetch only the specified URL without any of the options. ENVIRONMENT VARIABLE
The WWWOFFLE_PROXY environment variable can be used instead of the -c or -p options. There are three ways that the variable can be used. 1. When the variable is set to absolute pathname of a file, then that file is used as the configuration file like the -c option (for example /etc/wwwoffle/wwwoffle.conf). 2. The WWWOFFLE_PROXY variable can also be set to the hostname and the port number that would be used with the -p option (for example localhost:8080). 3. The third possibility is to set the variable to the hostname and the two port numbers for the WWWOFFLE HTTP proxy port and the WWWOFFLE control port (for example localhost:8080:8081). This way it will work with both types of commands (proxy access and con- trol). SEE ALSO
wwwoffled(8), wwwoffle.conf(5), diald(8). AUTHOR
Andrew M. Bishop 1996-2009 (amb@gedanken.demon.co.uk) March 13, 2009 wwwoffle(1)
All times are GMT -4. The time now is 11:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy