Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Do not display the command result in the console (updated)

by Crackers2 (Parson)
on Dec 06, 2013 at 01:43 UTC ( #1065877=note: print w/replies, xml ) Need Help??

in reply to Do not display the command result in the console (updated)

One issue is that your redirections are in the wrong order

$ ( echo "out"; echo "err" >&2 ) 2>&1 1>/dev/null err $ ( echo "out"; echo "err" >&2 ) 1>/dev/null 2>&1 $

The first one, like you have, ends up redirecting stdout to /dev/null, but stderr to the original stdout. The second one redirects stdout to /dev/null, and then stderr to the new stdout, i.e. also /dev/null

Replies are listed 'Best First'.
Re^2: Do not display the command result in the console (updated)
by young_monk_love_perl (Novice) on Dec 06, 2013 at 09:17 UTC

    Hi Crackers2,

    sorry about the mistake, the one in the code I'd like to run is correct, I checked. I'm correcting myself in the question. Also, the command does not output anything in the standard error output for now. So I don't understand why i still have the display.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1065877]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2023-06-01 16:46 GMT
Find Nodes?
    Voting Booth?

    No recent polls found