Sponsored Content
Full Discussion: wget and &
Top Forums UNIX for Dummies Questions & Answers wget and & Post 302601257 by davcra on Thursday 23rd of February 2012 08:15:12 AM
Old 02-23-2012
wget and &

Hi,
I'm trying to I'm trying to use wget to grab some data from the IRIS webservice. Basically its a web page that given the latitude and longitude for two points on the earth returns the distance and azimuth between them.
Its usage is simple you just input an address as follows,
http://www.iris.edu/ws/distaz/query?stalat=0.0&stalon=0.0&evtlat=15.0&evtlon=0.0
and it opens a page containing the data in XML.
I have tried,
Code:
wget http://www.iris.edu/ws/distaz/query?stalat=0.0&stalon=0.0&evtlat=15.0&evtlon=15.0

but get a bad request error which I think comes from the use of the ampersands in the address. Anyone know how I could do this??
Thanks
D

---------- Post updated at 02:15 PM ---------- Previous update was at 01:39 PM ----------

ok I got it, I just forgot the quotes Smilie
but if someone could tell me how to save as a text file I'd appreciate it.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

wget & rapidshare

Hello people, I have a question concerning wget and rapidshare. How I can download from Rapidshare (have a premium account) using command-like tool wget. It seems pretty easy, but I always get only very small file (5KB) something like html. Please correct me if I am doing something in a wrong... (1 Reply)
Discussion started by: trolis
1 Replies

2. UNIX for Dummies Questions & Answers

Search for & edit rows & columns in data file and pipe

Dear unix gurus, I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this: adam peter blah blah blah blah blah blah car 01 30 200 02 31 400 03 57 121 .. .. .. .. .. .. n y... (8 Replies)
Discussion started by: tintin72
8 Replies

3. UNIX for Dummies Questions & Answers

Problem with xterm & tcsh & sourcing a script in a single command

Hi friends, I have a script that sets the env variable path based on different conditions. Now the new path variable setting should not done in the same terminal or same shell. Only a new terminal or new shell should have the new path env variable set. I am able to do this only as follows: >cd... (1 Reply)
Discussion started by: sowmya005
1 Replies

4. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

5. Shell Programming and Scripting

Help needed in Curl & Wget

We are trying to invoke a https service from our unix script using curl command. The service is not getting invoked because it is SSL configured. Bypassing certification (using curl –k) does not work. curl -k https://site curl -k -x IP:Port https://site curl -k -x IP:443 https://id:pwd@site ... (0 Replies)
Discussion started by: dineshbabu01
0 Replies

6. Shell Programming and Scripting

replace & with & xml file

Hello All I have a xml file with many sets of records like this <mytag>mydata</mytag> <tag2>data&</tag2> also same file can be like this <mytag>mydata</mytag> <tag2>data&</tag2> <tag3>data2&amp;data3</tag3> Now i can grep & and replace with &amp; for whole file but it will replace all... (4 Replies)
Discussion started by: lokaish23
4 Replies

7. Shell Programming and Scripting

Replace & sign to &amp word

Hi, I have text file abc.txt. In this file, I have the following data. Input: Mr Smith &amp Mrs Smith Mr Smith &apos Mrs Smith Mr Smith & Mrs Smith Mr Smith& Mrs Smith Mr Smith &Mrs Smith Output: Mr Smith &amp Mrs Smith Mr Smith &apos Mrs Smith Mr Smith &amp Mrs Smith Mr Smith&amp... (4 Replies)
Discussion started by: naveed
4 Replies

8. Shell Programming and Scripting

Sort a the file & refine data column & row format

cat file1.txt field1 "user1": field2:"data-cde" field3:"data-pqr" field4:"data-mno" field1 "user1": field2:"data-dcb" field3:"data-mxz" field4:"data-zul" field1 "user2": field2:"data-cqz" field3:"data-xoq" field4:"data-pos" Now i need to have the date like below. i have just... (7 Replies)
Discussion started by: ckaramsetty
7 Replies

9. Shell Programming and Scripting

Wget - working in browser but cannot download from wget

Hi, I need to download a zip file from my the below US govt link. https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP I only have wget utility installed on the server. When I use the below command, I am getting error 403... (2 Replies)
Discussion started by: Prasannag87
2 Replies

10. Shell Programming and Scripting

SFTP Shell Script Get & Delete && Upload & Delete

Hi All, Do you have any sample script, - auto get file from SFTP remote server and delete file in remove server after downloaded. - only download specify filename - auto upload file from local to SFTP remote server and delete local folder file after uploaded - only upload specify filename ... (3 Replies)
Discussion started by: weesiong
3 Replies
GEOD(1) 						      General Commands Manual							   GEOD(1)

NAME
geod - direct geodesic computations invgeod - inverse geodesic computations SYNOPSIS
geod +ellps=<ellipse> [ -afFIlptwW [ args ] ] [ +args ] file[s] invgeod +ellps=<ellipse> [ -afFIlptwW [ args ] ] [ +args ] file[s] DESCRIPTION
Geod (direct) and invgeod (inverse) perform geodesic (Great Circle) computations for determining latitude, longitude and back azimuth of a terminus point given a initial point latitude, longitude, azimuth and distance (direct) or the forward and back azimuths and distance between an initial and terminus point latitudes and longitudes (inverse). The following runline control parameters can appear in any order: -I Specifies that the inverse geodesic computation is to be performed. May be used with execution of goed as an alternative to invgeod execution. -a Latitude and longitudes of the initial and terminal points, forward and back azimuths and distance are output. -ta A specifies a character employed as the first character to denote a control line to be passed through without processing. -le Gives a listing of all the ellipsoids that may be selected with the +ellps= option. -lu Gives a listing of all the units that may be selected with the +units= option. -[f|F] format Format is a printf format string to control the output form of the geographic coordinate values (f) or distance value (F). The default mode is DMS for geographic coordinates and "%.3f" for distance. -[w|W]n N is the number of significant fractional digits to employ for seconds output (when the option is not specified, -w3 is assumed). When -W is employed the fields will be constant width with leading zeroes. -p This option causes the azimuthal values to be output as unsigned DMS numbers between 0 and 360 degrees. Also note -f. The +args run-line arguments are associated with geodetic parameters for specifying the ellipsoidal or sphere to use. See proj documenta- tion for full list of these parameters and controls. The options are processed in left to right order from the run line. Reentry of an option is ignored with the first occurrence assumed to be the desired value. One or more files (processed in left to right order) specify the source of data to be transformed. A - will specify the location of pro- cessing standard input. If no files are specified, the input is assumed to be from stdin. For direct determinations input data must be in latitude, longitude, azimuth and distance order and output will be latitude, longitude and back azimuth of the terminus point. Latitude, longitude of the initial and terminus point are input for the inverse mode and respective forward and back azimuth from the initial and terminus points are output along with the distance between the points. Input geographic coordinates (latitude and longitude) and azimuthal data must be in DMS format and input distance data must be in units consistent with the ellipsoid major axis or sphere radius units. Output geographic coordinates will be in DMS (if the -f switch is not employed) to 0.001" with trailing, zero-valued minute-second fields deleted. Output distance data will be in the same units as the ellip- soid or sphere radius. The Earth's ellipsoidal figure may be selected in the same manner as program proj by using +ellps=, +a=, +es=, etc. Geod may also be used to determine intermediate points along either a geodesic line between two points or along an arc of specified dis- tance from a geographic point. In both cases an initial point must be specified with +lat_1=lat and +lon_1=lon parameters and either a terminus point +lat_2=lat and +lon_2=lon or a distance and azimuth from the initial point with +S=distance and +A=azimuth must be speci- fied. If points along a geodesic are to be determined then either +n_S=integer specifying the number of intermediate points and/or +del_S=dis- tance specifying the incremental distance between points must be specified. To determine points along an arc equidistant from the initial point both +del_A=angle and +n_A=integer must be specified which determine the respective angular increments and number of points to be determined. EXAMPLE
The following script determines the geodesic azimuths and distance in U.S. stature miles from Boston, MA, to Portland, OR: geod +ellps=clrk66 <<EOF -I +units=us-mi 42d15'N 71d07'W 45d31'N 123d41'W EOF which gives the results: -66d31'50.141" 75d39'13.083" 2587.504 where the first two values are the azimuth from Boston to Portland, the back azimuth from Portland to Boston followed by the distance. An example of forward geodesic use is to use the Boston location and determine Portland's location by azimuth and distance: geod +ellps=clrk66 <<EOF +units=us-mi 42d15'N 71d07'W -66d31'50.141" 2587.504 EOF which gives: 45d31'0.003"N 123d40'59.985"W 75d39'13.094" Note: lack of precision in the distance value compromises the precision of the Portland location. SEE ALSO
Thomas, P.D., 1970, Spheroidal Geodesics, Reference Systems & Local Geometry: U.S. Naval Oceanographic Office, S-138. HOME PAGE
http://www.remotesensing.org/proj 2000/03/21 Rel. 4.4 GEOD(1)
All times are GMT -4. The time now is 08:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy