An Nguyen wrote:
> I've been trying redirect 2>/dev/null but the message still gets echoed
> into the terminal.
> [..]
> i've tried cmd 1>blah 2>bob to redirect them into files,
> but i still get that message outputted onto the terminal.
Looking back at your first message, 1>blah 2>bob definitely
should be catching that "No route to host" message.
So you're saying the 'No route to host' is still getting through
even if you invoke your ./stats.pl command as:
../stats.pl 2>err.log 1>out.log
..and for sure that's a bourne compatible shell you're
invoking that from? (csh/tcsh syntax is different)
That really should work.. no message should be appearing on
the tty.
What perl command is being used to run 'rush -laj' (system(), open("|"), etc)
and are there any special shell redirection characters as
part of that command? Is the $ENV{SHELL} set to something other
than a bourne shell? (Try setting $ENV{SHELL}="/bin/sh"; explicitly)
Rush doesn't try writing anything to the tty directly,
so if you're getting problems with messages leaking past
>1 and 2>, I'm not sure why, and would have to work with you
interactively to figure that one out.
|