unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: Matthias Pfeifer <mpfeifer77@gmail.com>, help-gnu-emacs@gnu.org
Subject: Re: shell-command
Date: Wed, 11 Jan 2017 15:11:51 +0000	[thread overview]
Message-ID: <CAFyQvY2tiO07PJkhZK7S2yjvUfdhpNnPXok_FYO-KUHCD3xCeQ@mail.gmail.com> (raw)
In-Reply-To: <CAPzsW6jcFiaW9dhx+8gqipqT-tn167WpRCvJ5w8EL-PN4144yQ@mail.gmail.com>

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


  parent reply	other threads:[~2017-01-11 15:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 11:17 shell-command Matthias Pfeifer
2017-01-10 12:02 ` shell-command tomas
2017-01-11  8:45   ` shell-command Matthias Pfeifer
2017-01-11  9:39     ` shell-command tomas
2017-01-11 15:11     ` Kaushal Modi [this message]
2017-01-11 15:28       ` shell-command tomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFyQvY2tiO07PJkhZK7S2yjvUfdhpNnPXok_FYO-KUHCD3xCeQ@mail.gmail.com \
    --to=kaushal.modi@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mpfeifer77@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).