I've found mostly confusing the syntax about closing file descriptors.
Taking as example:
n>&-, i'm closing a file descriptor called n, i'm right ?
But i knew that if i want redirect something into another file descriptor, i must do that this way
n>&1, so the
& is used as marker for file descriptors, only when
>, or others redirection commands are used, and also this should be correct, right ?
- symbol can be used for redirection from/to
stdout as into:
So taking into account the rules said above, why
n>&- should close a file descriptor ? It seems like a redirection to