W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2002

Re: piping tidy output to a pager program

From: Terry Teague <terry_teague@users.sourceforge.net>
Date: Wed, 20 Mar 2002 00:51:58 -0800
Message-Id: <l03130301b8bdfd2d6571@[17.219.130.73]>
To: Morten Bo Johansen <mojo@image.dk>, <html-tidy@w3.org>
At 3:10 PM +0100 3/19/02, Morten Bo Johansen wrote:
>My little question is why it (seemingly) is not possible to
>capture the output of tidy in a pager program. If I do
>
>	tidy -e foo.html | most
>
>it is as if the output stream is terminated just before the
>pager program is launched leaving it with an emty buffer?
>

This limitation is documented in the "Overview.html" document (that used to
be the home page for the original Tidy project) provided with older
versions of Tidy (and is still available from the main Tidy web page) :

-----
Tidy writes errors to stderr, and won't be paused by the more command. A
work around is to redirect stderr to stdout as follows. This works on Unix
and Windows NT, but not on other platforms. My thanks to Markus Wolf for
this tip!

             tidy file.html 2>&1 | more
-----

Hope this helps.

Regards, Terry
Received on Wednesday, 20 March 2002 04:40:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:51 GMT