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

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

Re: shell-command


From: Kaushal Modi
Subject: Re: shell-command
Date: Wed, 11 Jan 2017 15:11:51 +0000

On Wed, Jan 11, 2017 at 3:46 AM Matthias Pfeifer <mpfeifer77@gmail.com>
wrote:

> 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...
>

Correct, because that redirects only errors to /dev/null. The standard
output is still sent to your default output device (terminal).


> $ scp somefile somehost:/tmp > /dev/null
>
> I ses nothing...
>

That is expected here again because ">" redirects standard output to
/dev/null. So the terminal gets nothing.


>
> Where am i mistaking?
>

You can simply try

ls > /dev/null

and see that you get no output on the terminal, because all output is
redirected to /dev/null

Here's one of the references that came up at top when I googled "unix
redirection": http://sc.tamu.edu/help/general/unix/redirection.html
-- 

Kaushal Modi


reply via email to

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