Results 1 to 2 of 2
Hi, Everybody, 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? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-15-2012 #1
- Join Date
- Jan 2012
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.
- 01-15-2012 #2
- Join Date
- May 2011
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.:
wget -O - http://www.example.com
lynx -dump http://www.example.com
Last edited by atreyu; 01-15-2012 at 05:22 AM. Reason: lynx