zsh-users
 help / color / mirror / code / Atom feed
* losing stderr messages
@ 2006-06-16  8:58 Charles Hallenbeck
  2006-06-16  9:20 ` Frank Terbeck
  2006-06-16  9:21 ` Peter Stephenson
  0 siblings, 2 replies; 4+ messages in thread
From: Charles Hallenbeck @ 2006-06-16  8:58 UTC (permalink / raw)
  To: zsh list; +Cc: David Csercsics

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Hi list,

I am pretty new to zsh, using it for login shells now for about a month. 
My question may be simple.

I have a command sequence which works as expected when bash is the 
default shell (/bin/sh) but which fails to capture stderr output when 
/bin/sh points to zsh. Can someone tell me why, and better yet how to 
find the missing stderr messages? The sequence is:

{ ./configure && make && make install } &> log &

When run under bash, all three tasks are backgrounded, and all output is 
sent to log. Under zsh, all three tasks are backgrounded, but only 
stdout goes to log. stderr output vanishes somewhere. 

Details: zsh 4.3.2 (i686-pc-linux-gnu)
Linux hq 2.6.16 #2 PREEMPT Mon Jun 12 10:37:27 EDT 2006 i686 GNU/Linux
Distro is Debian unstable.

Any insights appreciated.

Chuck

-- 
The Moon is Waning Gibbous (75% of Full)
Get downloads from http://www.mhcable.com/~chuckh
  and remember, INFORMATION WANTS TO BE FREE!

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: losing stderr messages
  2006-06-16  8:58 losing stderr messages Charles Hallenbeck
@ 2006-06-16  9:20 ` Frank Terbeck
  2006-06-16  9:21 ` Peter Stephenson
  1 sibling, 0 replies; 4+ messages in thread
From: Frank Terbeck @ 2006-06-16  9:20 UTC (permalink / raw)
  To: zsh list

Charles Hallenbeck <chuckh@hhs48.com>:
> I have a command sequence which works as expected when bash is the 
> default shell (/bin/sh) but which fails to capture stderr output when 
> /bin/sh points to zsh. Can someone tell me why, and better yet how to 
> find the missing stderr messages? The sequence is:
> 
> { ./configure && make && make install } &> log &
> 
> When run under bash, all three tasks are backgrounded, and all output is 
> sent to log. Under zsh, all three tasks are backgrounded, but only 
> stdout goes to log. stderr output vanishes somewhere. 

Hi Charles,
'&>' is not a POSIX compliant. It's a shortcut that bash uses, AFAIK.
You could use '>&', which is zsh's shortcut, or (if it's a script,
that uses '#!/bin/sh') stay compatible and use: '> log 2>&1 &'.

Regards, Frank


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: losing stderr messages
  2006-06-16  8:58 losing stderr messages Charles Hallenbeck
  2006-06-16  9:20 ` Frank Terbeck
@ 2006-06-16  9:21 ` Peter Stephenson
  2006-06-16  9:36   ` Frank Terbeck
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2006-06-16  9:21 UTC (permalink / raw)
  To: zsh list

Charles Hallenbeck wrote:
> I have a command sequence which works as expected when bash is the
> default shell (/bin/sh) but which fails to capture stderr output when
> /bin/sh points to zsh. Can someone tell me why, and better yet how to
> find the missing stderr messages? The sequence is:
> 
> { ./configure && make && make install } &> log &

This should work fine.  Most people would probably write ">&" but they
have the same effect.  The problem may be deeper inside the scripts.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: losing stderr messages
  2006-06-16  9:21 ` Peter Stephenson
@ 2006-06-16  9:36   ` Frank Terbeck
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Terbeck @ 2006-06-16  9:36 UTC (permalink / raw)
  To: zsh list

Peter Stephenson <pws@csr.com>:
> Charles Hallenbeck wrote:
> > I have a command sequence which works as expected when bash is the
> > default shell (/bin/sh) but which fails to capture stderr output when
> > /bin/sh points to zsh. Can someone tell me why, and better yet how to
> > find the missing stderr messages? The sequence is:
> > 
> > { ./configure && make && make install } &> log &
> 
> This should work fine.  Most people would probably write ">&" but they
> have the same effect.  The problem may be deeper inside the scripts.

Oops, I always thought '&>' didn't work in zsh, but I was wrong.
So, the OP can ignore my Statement about that.

Regards, Frank


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-06-16  9:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-16  8:58 losing stderr messages Charles Hallenbeck
2006-06-16  9:20 ` Frank Terbeck
2006-06-16  9:21 ` Peter Stephenson
2006-06-16  9:36   ` Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).