LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   2>/dev/null && {...} need explanation (https://www.linuxquestions.org/questions/linux-networking-3/2-dev-null-and-and-%7B-%7D-need-explanation-82549/)

G-Fox 08-16-2003 11:13 AM

2>/dev/null && {...} need explanation
 
Hi everybody who read this message. I am beginer and I need a little help...

ifconfig eth1 up 2>/dev/null && {...

please explain this 2>/dev/null && {...

thanks

tchernobog 08-16-2003 12:10 PM

"2>" redirects standard error messages to an output.
You can think it as the normal redirection.

/dev/null means you're redirecting your error messages to "trash". See http://linux.oreillynet.com/pub/a/linux/lpt/13_14.html for further info.

Then, "&&" says to wait for the first part of the command to complete before starting what comes after "&&".

G-Fox 08-16-2003 12:31 PM

Thank you tchernobog for help :)


All times are GMT -5. The time now is 04:04 PM.