On Fri, Jun 15, 2001 at 02:59:59PM +1000, Andy Eager wrote:
> Andrew,
>
> Thanks for your reply.
>
> Nothing wrong with ncurses, but want it to be able to run with normal
> unix i/o redirection (or piping) as well as from stdin. Don't want
> ncurses sending anything other than boring old text (maybe even the odd
> line-feed or form-feed).
Oh, that's easy.
Ever noticed how ls(1) formats its output into columns? But if you
pipe it through, say, less, it doesn't? It checks if stdout is a tty or
not.
See the man page for isatty (section 3).
-Andrew.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug