While searching in the internet a bit, i found this.
n>&m means redirect FD n to the same places as FD m. Eg, 2>&1 means send STDERR to the same place that STDOUT is going to.
STDIN is FD 0, while STDOUT is FD 1, and STDERR is FD 2
ref: http://www.linuxsa.org.au/tips/io-redirection.html
File descriptor 5 is sometimes used because it is the lowest numbered file descriptor that was never really used for anything else (FD 4 was /dev/tty
on some very old unixes and FD 3 has had various, non-standard, system specific, uses in another Unix). Although since neither 3 or 4 have been used in over 2 decades it is probably just coincidence (or tradition) that you have noticed FD 5 popping up.
ref: http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/File-Descriptors.html
As to the reason it is used. By using a file descriptor the script-writer avoids the need to actually write to a file, which could save him time and make the script cleaner (no possibility of accidently leaving around files). Furthermore it lets you do all the cool things with redirecting streams to different locations and so on.
1&>5
, but the body of your post says1>&5
. Edit the message and fix it.