Linx / Lynx CLI output?
Does anyone know if it is possible to use a console-based web browser (i.e. links or lynx) to render a page in the terminal, but then terminate immediately? I basically want to pipe the output of a webpage to grep. I was thinking this also might be possible with curl or wget...As I said, I'm trying do the equivalent of cating a text file and piping it to grep, but with an HTML page.
Any insight would be appreciated.
Tell wget to write to STDOUT (standard output, or more simply, the terminal screen) instead of writing to file, which is the default. use the -O (capital oh, not zero), followed by a dash (hyphen), e.g.:
Edit: forgot about lynx, i used to actually use this a lot in scripts:
wget -O - http://www.example.com
lynx -dump http://www.example.com