On Tue Aug 04 1998, Tethys wrote:

> Does anyone know of a web browser that can accept HTML from standard
> input? I have a program that generates HTML, which I'd like to just
> pipe into my web browser. I can't se ehow to do it with the two I've
> got (Netscape and Lynx).

Can't lynx do that?

It can do lots of neat things, like dump to stdout, and I think it can take
from stdin.

If not, you could try something like this (with any browser)...

cat file.html | lynx -force_html /dev/stdin

I do some cgi programming from time to time, and I have found lynx to be
invaluable as a development tool for diagnostic purposes (it can dump
source as well as "rendered" text).

There's a way to get a running netscape process to read a new URL...

netscape -remote openFile\(/path/to/a/file.html\)

(netscape MUST already be running for this to work).

(And BTW, to do the same for specifying specific URLs to netscape, use
"openURL()" rather than "openFile()").

> BTW, I'm using Sparc Linux, so binary only Intel browsers are no use
> to me.

lynx has been available for many platforms for many years, and I'd be
suprised if there isn't a sparc-linux version in any standard sparc
distribution of linux.

Using /dev/stdin like that can be a neat trick for all sorts of situations.
(Like passing parameters to a program that can't/won't read them from the
command line, but can read data from a file - so pass it via /dev/stdin
instead!)

/dev/stdin is nothing magical, but it is a standard feature of linux:

lrwxrwxrwx 1 root root 17 Mar 13 17:29 /dev/stdin -> ../proc/self/fd/0

(Some distributions have /dev/stdin -> fd/0 where /dev/fd -> /proc/self/fd/).

Hope this helps (or at least gives you some clues to get something
workable happening).

Cheers                                                         .
Tony  __________  Tony Nugent            >> - Linux -  <<  _--_|\ 
 / / / / __/ __ \ [EMAIL PROTECTED]       >> UNIX power << /     *\ 
/ /_/ /\ \/ /_/ / [EMAIL PROTECTED] >>  on a pc!  << \_.--._/
\____/___/\___\_\ UNIX Systems Officer, Faculty of Science      v
 University of Southern Queensland, Toowoomba Oueensland Australia
-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-

Reply via email to