News for hackers. Stuff that matters.
Re:Sockets in Your Shell by dx87 on Thursday December 03, 2020 @08:01AM (#25288396)
The man page for bash says that /dev/tcp and /dev/udp actually can be real files that any program can use, but that if they're absent, it emulates the behavior on its own.
Re:Sockets in Your Shell by duskwuff on Thursday December 03, 2020 @02:27PM (#25293377)
> The man page for bash says that /dev/tcp and /dev/udp actually can be real files that any program can use

But that's really just a bit of wishful thinking -- those files/directories don't exist on any mainstream UNIX OS I'm aware of.

Re:Sockets in Your Shell by who23 on Saturday December 05, 2020 @02:30AM (#25312612)
Hey I'm the author. Yes, as far as I know it's just sugar for opening a socket, and there's almost never a file that exists. To treat it as a file, you need to assign a file descriptor to it, which you can then read and write from.