问题
In bash the following command open a socket
exec 3<>/dev/tcp/192.168.1.200/8080
In the ash this command does not work. Are there an equivalent of this command for ash?
here after the output error of the command in ash:
-ash: can't create /dev/tcp/192.168.1.200/8080: nonexistent directory
回答1:
No, there is not. The standard POSIX bourne shell doesn't offer this feature.
You may be able to accomplish what you need with socat or nc.
This bash feature is very strange by the way, considering that it pretends that there is a directory called /dev/tcp
which does not actually exist.
来源:https://stackoverflow.com/questions/10640369/equivalent-of-exec-3-dev-tcp-anyaddress-com-80-in-ash