So as I'm writing my own shell for school, I have to implement redirections.
I've looked at the GNU Bash manual, and a fair amount of tutorials, but I'm still having troubles understanding what exactly means the ampersand in these redirections.
I know when I have to use them when using simple redirections, like &>file or 2>&- but I don't get the precise meaning of it.
Could someone explain?
>mean or what does|mean or why was$chosen? Additionally&>is sort of a non-standard redirection. – jesse_b Feb 28 '20 at 14:32&from the>. Just like in C or javascript the!=operator is not!and=but just!=, so it's>&or<&in the shell language. All those operators are explained in the bash manpage, including the fact that[n]>&-is identical to[n]<&-, and[n]>&nis identical to[n]<&n(wherenis a number), but>& pathis something completely different than>&n(wherepathis NOT a number). – Feb 28 '20 at 15:16