On 15Feb2013 08:48, Cameron Simpson <cs(a)zip.com.au> wrote:
On 13Feb2013 16:03, Suvayu Ali <fatkasuvayu+linux(a)gmail.com>
| I know about redirection, but was not aware that I could also open
| sockets! Thanks a lot for the nice explanation, I'll read up more.
Unless bash has even more weirdness in it than I thought, the redirection
is probably relying on a Linuxism to open a port via a Linux specific
/dev entry. Plan 9 pioneered that mechanism. (That said, I know bash
sometimes fakes up /dev/stdin etc for platform lacking them, so maybe it
fakes /dev/tcp as well...)
I had cause to look into this the other week. This isn't a linuxism, it is
entirely bash internal i.e. even Linux doesn't have /dev/tcp/... to open a TCP
connection. Plan 9 does of course, allowing all programs to do this easily.
Cameron Simpson <cs(a)zip.com.au>