本文介绍了等效于ash中的exec 3/dev/tcp/anyaddress.com/80的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在bash中,以下命令打开套接字
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?
在ash中命令输出错误之后:
here after the output error of the command in ash:
-ash: can't create /dev/tcp/192.168.1.200/8080: nonexistent directory
推荐答案
不,没有.标准POSIX bourne shell不提供此功能.
No, there is not. The standard POSIX bourne shell doesn't offer this feature.
顺便说一句,这个bash功能非常奇怪,因为它假装有一个名为/dev/tcp
的目录,该目录实际上并不存在.
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.
这篇关于等效于ash中的exec 3/dev/tcp/anyaddress.com/80的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!