POST/GET in comandline script

V

vjp2.at

ANyone have any hints how I can get started figuring out how to do this?


much obliged


From: [9]Klaus Johannes Rusch ([10][email protected])
Subject: Re: shell script to lynx medline
Newsgroups:
[12]comp.infosystems.www.browsers.misc
Date: 2004-04-20 06:38:50 PST

I used to have a BASHRC proc for searching the medical database MEDLINE

medline () { SRCH=`echo $* | sed -e 's/ /+/g'`; lynx -accept_all_cookies '[13]http://www.ncbi.nlm.nih.gov/ht bin-post/Entrez/query_old?form=4&title=no&term='$SRCH'&submit=Search&field=All+++++++++++++++++++Fields&mode=A
utomatic&relpubdate=No+Limit&dispmax=100+&Dopt=d';}

They now use the following format:

[14]http://www.ncbi.nlm.nih.gov/entrez/query.fcgi

But I can't get this to work like a BASH proc..

The new site requires POST requests so you will need to pass parameters
using the -post_data option.
 
T

Toby A Inkster

vjp2.at said:
ANyone have any hints how I can get started figuring out how to do this?

Install the Perl libwww package. It provides /usr/bin/POST (and also GET
and HEAD).
 
W

William Park

In said:
ANyone have any hints how I can get started figuring out how to do this?
I used to have a BASHRC proc for searching the medical database MEDLINE

medline () { SRCH=`echo $* | sed -e 's/ /+/g'`; lynx
-accept_all_cookies
'[13]http://www.ncbi.nlm.nih.gov/htbin-p...tic&relpubdate=No+Limit&dispmax=100+&Dopt=d';}

They now use the following format:

[14]http://www.ncbi.nlm.nih.gov/entrez/query.fcgi

But I can't get this to work like a BASH proc..

The new site requires POST requests so you will need to pass parameters
using the -post_data option.

lynx -post_data http://... << EOF
....
EOF

man lynx
-post_data
properly formatted data for a post form are read in from
stdin and passed to the form. Input is terminated by a
line that starts with '---'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top