标准输入传递到UNIX主机/ dig命令 [英] Pass stdin into unix host/dig command
本文介绍了标准输入传递到UNIX主机/ dig命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
让我们说我有知识产权的的进入,我是尾矿日志列表
Let's say I have a list of ip's coming into a log that i'm tailing
1.1.1.1
1.1.1.2
1.1.1.3
等
和我想轻松解决他们的主机名。我想能够
and i'd like to easily resolve them to host names. I'd like to be able to
tail -f access.log | host -
从而未能为主机不会以这种方式了解标准输入的输入。什么是做的最简单的方法,而无需编写一个静态文件或回落学习Perl / Python中的/ etc ..?
Which fails as host doesn't understand input from stdin in this way. What's the easiest way to do with without having to write a static file or fall back to perl/python/etc.. ?
推荐答案
使用 xargs的-L
:
tail -f access.log | xargs -l host
这篇关于标准输入传递到UNIX主机/ dig命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文