LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   have direfenre between >&, &>, 2>&1 and 1>&2 ? (https://www.linuxquestions.org/questions/linux-newbie-8/have-direfenre-between-and-and-2-and-1-and-1-and-2-a-451385/)

xcore_on 06-03-2006 11:46 PM

have direfenre between >&, &>, 2>&1 and 1>&2 ?
 
have direfenre between >&, &>, 2>&1 and 1>&2 ?

explation please.

thanks in advance!

gilead 06-04-2006 12:04 AM

This is all in the man page for your shell. If you're using bash for your shell, type man bash and search for redirection. Briefly though, if you are using bash...

&>word and >&word are functionally the same, they both redirect the standard output and standard error to word. In bash, the first form is preferred. 2>&1 redirects standard error to the standard output and 1>&2 redirects standard output to the standard error.


All times are GMT -5. The time now is 06:52 AM.