lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev -post_data


From: fraser
Subject: lynx-dev -post_data
Date: Tue, 17 Jul 2001 12:29:15 -0700 (PDT)

I'm trying to do the following form action using lynx -post_data

<form action="http://download.geocomm.com/cgi-bin/DOWNLOAD"; method="POST">
<input type="hidden" name="CATALOGID" value="GCI-NMDRG-05439">

this is to put into a C shell script and I cant figure out exactly how to do
it.  There is little documentation on the -post_data option.

here's the page I'm working from:
http://www.gisdatadepot.com/catalog/US/61086/2519/group1.html



Here's the chunk of script:

#!/bin/csh  -x

if ( $1 == "" ) then 
  echo "Usage :  download_drg State County USGS_ID";
  exit 1
endif

#lynx -dump http://www.gisdatadepot.com/catalog/US/sublist.html >! statelist
#set link_num = "`grep '$1' statelist | cut -d '[' -f 2 | cut -d ']' -f 1`"
#set link = "`grep '$link_num\.' statelist | cut -d ' ' -f 4`"
#lynx -dump "${link}sublist.html" >! countylist
#set link_num = "`grep '$2' countylist | cut -d '[' -f 2 | cut -d ']' -f 1`"
#set link = "`grep '$link_num\.' countylist | cut -d ' ' -f 4`"
#lynx -dump "$link" >! index
#set link_num = "`grep 'DRG.*24K' index | cut -d '[' -f 2 | cut -d ']' -f 1`"
#echo 2b
#set link = "`grep '$link_num\.' index | cut -d ' ' -f 4`"
#lynx -source "$link" >! drglist
set line_num = "`grep -n '$3' group1.html | head -1 | cut -d ':' -f 1`"
set line_num = "`expr $line_num + 1`"
set action = "`nawk -f $SCRIPT_HOME/awk/part -v first=$line_num -v 
last=$line_num group1.html | nawk -f get_download_action.awk`"
#set action = "http://download.geocomm.com/cgi-bin/DOWNLOAD "
set line_num = "`expr $line_num + 1`"
set catalog_id = "`head -$line_num group1.html | tail -1 | nawk -f 
get_catalog_id.awk`"
echo "CATALOGID=`echo $catalog_id | sed s/-/%2D/g`" >! formdata
echo "---" >> formdata
lynx -post_data $action < formdata





; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]