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 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 3
Linx / Lynx CLI output?
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? 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.
Thanks,
Dan
- 01-15-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,745
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:Code:wget -O - http://www.example.com
Code:lynx -dump http://www.example.com
Last edited by atreyu; 01-15-2012 at 04:22 AM. Reason: lynx


Reply With Quote
