4 ms·
It just seems confusing that bash is using the /dev namespace for this feature. Are there circumstances where /dev/tcp/host/port might be provided by the opera
by gnu8 5y ago
It just seems confusing that bash is using the /dev namespace for this feature.
Are there circumstances where /dev/tcp/host/port might be provided by the operating system and provide the same functionality? Or is that just saying bash will stay out of the way if you are trying to access special files in /dev if they really exist?
- dpedu 5y agoUnless the operating system decides to use bash to access some device, it's fine. Nothing besides bash can see these. They're not really there. It's a mirage created by bash.
- FreeFull 5y ago/dev/std{in,out,err} are provided by Linux, and bash does stay out of the way there. I'm not aware of anything that provides /dev/tcp/host/port, although I think Plan 9 might have something similar. If the file happens to exist, bash will use the file rather than its own special functionality.
- zamadatix 5y agoThe old TLI/XTI alternatives to BSD sockets (pre when BSD sockets were standardized into POSIX sockets) back in the System V days provided this path/socket connection format. For a modern holdover these are still available in Solaris.