Sponsored Content
Top Forums Shell Programming and Scripting Can't set parameter to lynx properly Post 302998087 by migurus on Wednesday 24th of May 2017 11:47:32 PM
Old 05-25-2017
Can't set parameter to lynx properly

My intention is to go through list of addresses and call google geocode api for each of them. I am using lynx for this, but somehow I can't supply the parameters to it in a proper way.

To show that my parameters are OK I just hardcoded one address in my script and put it in my input file, and the hardcoded call runs just fine:

Code:
#!/bin/ksh
rqst1='http://maps.googleapis.com/maps/api/geocode/xml?&address='
rqst2=' CA, USA&sensor=false'
INPF=${1:-addr_list}
while read addr; do
set -x
        lynx -dump "'""$rqst1""$addr""$rqst2""'"
        lynx -dump 'http://maps.googleapis.com/maps/api/geocode/xml?&address=10925 RAILROAD ST&sensor=false'
done < $INPF

 $ cat addr_list
 10925 RAILROAD ST

I set -x to show how my parameters look and I don't see any fault on my side, yet lynx is not happy, here is the results:
Code:
 + lynx -dump 'http://maps.googleapis.com/maps/api/geocode/xml?&address=10925 RAILROAD ST CA, USA&sensor=false'
 Alert!: Unsupported URL scheme!
 lynx: Start file could not be found or is not text/html or text/plain
      Exiting...
+ lynx -dump http://maps.googleapis.com/maps/api/...&address=10925 RAILROAD ST&sensor=false
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
 <status>OK</status>
 <result>
 ... etc...

Please point me into right direction here.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

DEBUG_PROG and opts: parameter not set

I am using a Sun Ultra 30 with 250MG of RAM and 9GIG of hard drive. I connect to the machine via Exceed 6 and have the Oracle8i for Solaris in the cdrom drive. I have read and complied with Oracle's instruction in preparation to installing Oracle. Since I don't have enough space to cp the content... (1 Reply)
Discussion started by: Alexxx14
1 Replies

2. Shell Programming and Scripting

ksh: dbfFILe: parameter not set

Having the following message returned: FIND REDLOG FILES..... ksh: dbfFILe: parameter not set When I attempt to perform the script below....#!/bin/ksh . $HOME/.profile # Initial Script Prerequisites ORACLE_SID=MDirect ; export ORACLE_SID REDOLOGDIR=$ARCLOGDEST ; export REDOLOGDIR... (2 Replies)
Discussion started by: Cameron
2 Replies

3. Shell Programming and Scripting

how do I make dynamic parameter names? Or get the value of a parameter evaluated twi

Say I write something like the following: var1=1 var2=2 for int in 1 2 do echo "\$var$int" done I want the output to be: 1 2 Instead I get something like: $var1 $var2 (2 Replies)
Discussion started by: Awanka
2 Replies

4. UNIX and Linux Applications

set mysql password with host parameter

hi, linux gurus... i'm trying to write a script in ksh called ResetPass that allows a user to change mysql passwords. the script accepts user, password and host like this: ResetPass <user> <password> <host>. here's the code: ***************************************************** mysql... (1 Reply)
Discussion started by: ankimo
1 Replies

5. Shell Programming and Scripting

lynx browser set permanently option

hi all, is there somebody that know how can I set an permanently option for the lynx text browser? The reason is if I open some URL's and type my login infos then lynx show follow message: P)roceed, use G)ET or C)ancel Server asked for 301 redirection of POST content to URL: The UNIX... (1 Reply)
Discussion started by: research3
1 Replies

6. Shell Programming and Scripting

Dot operator and space, Parameter not set

Hi, i have this script setenv.sh if then echo "is empty" fi echo "done" The following is the result when i run the script from command without and with a dot and space operator $ setenv.sh is empty done $ . setenv.sh sh: VAR_1: Parameter not set. $ It's our standard to run... (5 Replies)
Discussion started by: ysrini
5 Replies

7. Shell Programming and Scripting

Command that takes one parameter and then searches for the passed in parameter

Hi I am looking for a unix command or a small shell script which can takes one parameter and then searches for the passed in the parameter in any or all files under say /home/dev/ Can anyone please help me on this? (3 Replies)
Discussion started by: pankaj80
3 Replies

8. Programming

Problem with STL's std::set container parameter to the operator << ()

Hi, I have this following code which gives me error when compiling. The problem is happening at the point where I create a const_iterator inside the overloaded insertion operator (i.e) operator << () function. The template argument version of set is not correct I guess. Could anyone please pitch... (3 Replies)
Discussion started by: royalibrahim
3 Replies

9. Shell Programming and Scripting

"ksh: XYZ: parameter not set" in .profile

Hi, A very basic query. I am working on two different UNIX servers and I see different behaviours for my user id. This has to be a setting in the .profile, but I can't seem to find where :confused: So, in one server if I type echo $XYZDD (a random variable), I get a blank line with no... (2 Replies)
Discussion started by: ALDonP
2 Replies

10. Shell Programming and Scripting

Solaris "ksh" Parameter Not Set

Getting the following when I try to set -u or set -o nounset in ksh on Solaris. Anyone ever seen this? Using an account I just built so everything is default and default shell is set to ksh. Oracle Corporation SunOS 5.11 11.3 September 2015 bar@solaris11:~$ echo $0 -ksh bar@solaris11:~$ set... (3 Replies)
Discussion started by: epost
3 Replies
man2html(1)						      General Commands Manual						       man2html(1)

NAME
man2html - format a manual page in html SYNOPSIS
man2html [options] [file] DESCRIPTION
man2html converts a manual page as found in file (or stdin, in case no file argument, or the argument "-", is given) from man-style nroff into html, and prints the result on stdout. It does support tbl but does not know about eqn. The exit status is 0. If something goes wrong, an error page is printed on stdout. This can be used as a stand-alone utility, but is mainly intended as an auxiliary, to enable users to browse their man pages using a html browser like lynx(1), xmosaic(1) or netscape(1). The main part of man2html is the troff-to-html engine written by Richard Verhoeven (rcb5@win.tue.nl). It adds hyperlinks for the following constructs: foo(3x) "http://localhost/cgi-bin/man/man2html?3x+foo" method://string "method://string" www.host.name "http://www.host.name" ftp.host.name "ftp://ftp.host.name" name@host "mailto:name@host" <string.h> "file:/usr/include/string.h" (The first of these can be tuned by options - see below.) No lookup is done - the links generated need not exist. Also an index with internal hyperlinks to the various sections is generated, so that it is easier to find one's way in large man pages like bash(1). OPTIONS
When reading from stdin, it is not always clear how to do .so expansion. The -D option allows a script to define the working directory. -D pathname Strip the last two parts from the pathname, and do a chdir(dir) before starting the conversion. The -E option allows the easy generation of error messages from a cgi script. -E string Output an error page containing the given error message. The general form of a hyperlink generated for a man page reference is <method:cgipath><man2htmlpath><separator><manpage> with a default as shown above. The parts of this hyperlink are set using the various options. -h Set method:cgipath to http://localhost. -H host[.domain][:port] Set method:cgipath to http://host.domain:port. -l Set method:cgipath to lynxcgi:/usr/lib. -L dir Set method:cgipath to lynxcgi:dir. -M man2htmlpath Set the man2htmlpath to use. The default is /cgi-bin/man/man2html. -p Set separator to '/'. -q Set separator to '?'. This is the default. -r Use relative html paths, instead of cgi-bin paths. On a machine without running httpd, one can use lynx to browse the man pages, using the lynxcgi method. When some http daemon is running, lynx, or any other browser, can be used to browse the man pages, using the http method. The option -l (for `lynxcgi') selects the former behaviour. With it, the default cgipath is /usr/lib. In general, a cgi script can be called by <path_to_script>/<more_path>?<query> and the environment variables PATH_INFO and QUERY_STRING will be set to <more_path> and <query>, respectively. Since lynxcgi does not han- dle the PATH_INFO part, we generate hyperlinks with `?' as a separator by default. The option -p (for `path') selects '/' as a separator, while the option -q (for `query') selects '?' as a separator. The option -H host will specify the host to use (instead of localhost). A cgi script could use man2html -H $SERVER_NAME if the variable SERVER_NAME is set. This would allow your machine to act as a server and export man pages. BUGS
There are many heuristics. The output will not always be perfect. The lynxcgi method will not work if lynx was compiled without selecting support for it. There may be problems with security. AUTHOR
Richard Verhoeven was the original author of man2html. Michael Hamilton and Andries Brouwer subsequently improved on it. Federico Lucifredi <flucifredi@acm.org> is the current maintainer. SEE ALSO
lynx(1), man(1), hman(1) 1 January 1998 man2html(1)
All times are GMT -4. The time now is 02:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy