help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell-command


From: tomas
Subject: Re: shell-command
Date: Wed, 11 Jan 2017 10:39:02 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, Jan 11, 2017 at 09:45:55AM +0100, Matthias Pfeifer wrote:
> 2017-01-10 13:02 GMT+01:00 <tomas@tuxteam.de>:
> 
> > > However emacs keeps telling me "Shell command succeeded with no output."
> > > and the *Shell Command Output* buffer is in fact empty. I wonder where
> > the
> > > output goes?
> >
> > To stderr.
> >
> > Try this:
> >
> >   scp -rv foo@bar:~/some-dir /tmp > one 2>two
> >
> > and look at files "one" and "two".
> >
> > So either you wrap your scp in some kind of redirection or you look
> > into the ERROR-BUFFER.
> >
> 
> 
> That was just what I was thinking. And I fear that I must have some very
> basic misunderstanding here, but i was testing this before wrinting and did:
> 
> $ scp somefile somehost:/tmp 2> /dev/null
> 
> I see the same output as usual...
> 
> $ scp somefile somehost:/tmp > /dev/null
> 
> I ses nothing...
> 
> Where am i mistaking?

I can't say for sure (and am a bit pressed to check now), but most probably
scp checks whether it's "talking" to a tty on its stdout or not and adapts
its behaviour. Sounds grotty, but many potentially interactive programs
do that (and users are generally better off for it, except in cases like
this :-)

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlh1/TYACgkQBcgs9XrR2kYw6ACaA/0k3pzbjY/3/uCd3kMQ9OZR
i3QAn3G2sqZc/roRv+gNrs54n/PHnYAq
=YpnH
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]