Re: ssh in shell

From: Darren Dunham (ddunham_at_redwood.taos.com)
Date: 09/27/05


Date: Tue, 27 Sep 2005 16:27:10 GMT

Sascha Kaddatz <ssh.100.rendryn@spamgourmet.com> wrote:
> But I wann to redirect this message into a file or variable. Nothing
> works.

What does "nothing works" mean? Do you get output on the screen? Is
the output file created? Is there data in the file? Do you get both
output and error in the file?

> ssh ... "/etc" >?test.dat
> ssh ... "/etc >?test.dat" (for redirecting on the remote system)

What is '>?' supposed to mean? I've never seen that before.

> Did anybody know a solution?

What shell are you using? If you have an sh-style shell then you can
redirect STDERR.

ssh ... "/etc" 2>test.dat

I'm not sure this has anything to do with ssh in particular. It just
seems to be a question of how to redirect STDERR in your shell of
choice.

-- 
Darren Dunham                                           ddunham@taos.com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >


Relevant Pages

  • Re: Backgrounding a stream, and sendmail?
    ... >> just redirect the output to a file instead of sendmail.) ... > shell command like ... when prog_b has it's stdout redirected nothing ... > is done instead of printing to stdout you could start sendmail from within ...
    (comp.os.linux.development.apps)
  • Re: Linux time not redirecting output to log file ...
    ... It just spits its output on standard err (not ... The reason is that time is a keyword for the shell. ... use a subshell and then redirect the output from the subshell. ...
    (Debian-User)
  • Re: Backgrounding a stream, and sendmail?
    ... > but that doesn't work at all, even if I just redirect ... > the output to a file instead of sendmail.) ... The shell won't restart prog_c for you, ... did was connecting stdout of prog_b to the stdin of prog_c ...
    (comp.os.linux.development.apps)
  • Re: What is the difference if I use exec to open a file?
    ... In the Bourne shell, when you redirect a compound command, the ... shell forks a subshell (actually earlier Bourne shells forked ... then redirects stdin to the file, run the commands, then restore ...
    (comp.unix.shell)
  • Re: Doubt ls-l|more
    ... The trick is that the shell starts the process, ... with its standard output redirected ... > to a pipe. ... redirect standard output to the pipe ...
    (comp.unix.questions)