in reply to How to stop printing the output of a command on screen when the command fails?
Redirect the STDERR stream. In bash, for example, you can do:
p4 where filename 2>&1This tells the p4 command to send the STDERR stream (handle 2) to handle 1 (STDOUT). I expect that the same syntax will likely work in backticks, but I've never tried it, so you'll need to verify that. There are multiple ways to redirect the I/O streams using perl, so you may want to read perldoc perlipc and perldoc -f open to start with.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to stop printing the output of a command on screen when the command fails?
by perl_mystery (Beadle) on Dec 24, 2010 at 05:24 UTC | |
by cdarke (Prior) on Dec 24, 2010 at 12:12 UTC | |
by perl_mystery (Beadle) on Dec 25, 2010 at 01:48 UTC | |
by cdarke (Prior) on Dec 26, 2010 at 09:30 UTC |