[TriLUG] seeking WGET assistance, maybe LYNX is the answer ??

erik at underhanded.org erik at underhanded.org
Thu Sep 23 17:32:42 EDT 2004


On Thu, Sep 23, 2004 at 12:30:05PM -0700, Turnpike Man wrote:
> I am connecting to a temp/humidity device with embedded web server.  It comes
> with a win32 based HTTPGET.exe proggy that has 2 switches in it that I need,
> but I don't want to use win32, plus the alarm portion requires Outlook to be
> installed with a working profile on the monitoring machine, which would be a
> server and I don't wanna do that.
> 
> So it would seem WGET would be a Linux replacement I could find such switches
> in, but I'm having not so good luck.  Here's the description of the WGET
> switches I'm seeking:
> 
> 1.  raw mode (no HTTP headers)  {-r in HTTPGET}
> 2.  POST string to URL  {-S in HTTPGET}
> 
> Then I'm going to append the results onto to a txt file, or better yet, to a
> database where I add a new row each time I grab results.  Maybe LYNX is another
> possible solution??
> 
> The HTTPGET get proggy sends a command like this to retrieve output:
> httpget -r -S "*SRT\r" ip.ad.dr.es:1000
> (where \r = carriage return termination character)

(found with wget --help)

GNU Wget 1.9.1
-s,  --save-headers        save the HTTP headers to file.
--post-data=STRING    use the POST method; send STRING as the data.
--post-file=FILE      use the POST method; send contents of FILE.


I don't believe wget saves headers by default (need to use -s), may want to 
check if you have wierd options in a wgetrc.  I tend to just specify everything
on the commandline.



More information about the TriLUG mailing list