在Bash中简单的socket服务器? [英] Simple Socket Server in Bash?

查看:170
本文介绍了在Bash中简单的socket服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有快速绑定到TCP端口/ IP地址和简单地打印出所有信息标准输出的方法?我有写东西127.0.0.1:4444一个简单的调试解决方案,我想能够简单地结合起来,从bash和打印所有的端口遇到。有没有一种简单的方法来做到这一点?


解决方案

  $ NC -k -l 4444> filename.out

请参见 NC(1)

Is there a way to quickly bind to a TCP port/ip address and simply print out all information to STDOUT? I have a simple debugging solution which writes things to 127.0.0.1:4444 and I'd like to be able to simply bind up a port from bash and print everything that comes across. Is there an easy way to do this?

解决方案

$ nc -k -l 4444 > filename.out

see nc(1)

这篇关于在Bash中简单的socket服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆