delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/02/08/13:58:09

From: Eric Backus <ericb AT lsid DOT hp DOT com>
Subject: Re: tar +help
To: turnbull AT ecolan DOT sbs DOT ohio-state DOT edu
Date: Mon, 8 Feb 93 10:21:37 PST
Cc: ericb AT lsid DOT hp DOT com, djgpp AT sun DOT soe DOT clarkson DOT edu
Mailer: Elm [revision: 66.25]

> First, I'd like to thank Eric for the excellent job he's done porting
> the FSF utilities.
>     It's no big deal, but
> 
>     tar +help | more
> 
> doesn't work.  The output gets written to the console (actually
> stderr), and the pager reads a null file.  Under 4DOS
> 
>     tar +help |& more
> 
> works.  I seem to recall that there are ways to achieve this end under
> GO32, and maybe under DOS 5.
>     Is this behavior consistent across the FSF utilities?

The problem here is that tar is writing to stderr rather than stdout.
The latest version of GNU tar (version 1.11.1) fixes this problem.  I
have already ported this but haven't yet bothered to make it
available.

As you noticed, you can work around the problem with 4DOS, by
redirecting stderr to stdout.  Similarly, if you use MS_SH200, you can
work around the problem by typing:

	tar +help 2>&1 | more

Although I haven't tried it, I assume that you can also work around
the problem by changing the GO32 environment variable.  I no longer
remember the syntax for this, and my documentation is at home, sorry.
As far as I know, DOS 5 doesn't provide any way to do this.

As for consistant behavior, I believe that in general, usage messages
are sent to stderr.  I think many people objected to this in the case
of tar, because the usage message is significantly longer than one
24-line screen, and this is probably why tar 1.11.1 switched to using
stdout.
--
				Eric Backus
				ericb AT lsid DOT hp DOT com
				(206) 335-2495

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019