Re: /dev/tcp
Rich <[email protected]>
| Newsgroups | comp.os.linux.misc |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
Eli the Bearded <*@eli.users.panix.com> wrote: > What system(s) have /dev/tcp/* natively? What "systems"? Only those with a /bin/bash compiled with this "special bash feature" compiled in. > $ man bash > [...] > REDIRECTION > [...] > Bash handles several filenames specially when they are used in > redirections, as described in the following table. If the > operating system on which bash is running provides these > special files, bash will use them; other wise it will emulate > them internally with the behavior described below. > [...] > /dev/tcp/host/port > If host is a valid hostname or Internet address, > and port is an integer port number or service name, > bash attempts to open the corresponding TCP socket. > > I don't see it on the various systems I have handy (Debian 13, Amazon > Linux 2023, Mac OS 15.7.x, NetBSD 10.1, Android 14). > is it a plan9 thing? It's a Bash feature. Note the man page quote you provided: > **Bash** handles several filenames specially when they are used in > redirections These are handled by Bash, they don't exist as part of the OS (system).