pssh输入动态的iplist
pssh的ip列表有2种输入方式:
- -h iplist_file
- -H ip字符串如 user@host:port,只能写一个
通常情况下会有很多个主机,整理为iplist文件使用。但每次都要做文件和维护文件是挺麻烦的一件事,希望能有个动态结果,比如cat或其他命令的结果作为输入,像管道一样
实现如下:
pssh -H "`cat broadcast.iplist`" -l mozat -A -P "date"
sort of, I have some experience in the domain of database(MySQL/mongo), java, python, front-end, etc. I'll willing to give and accept bits of help from others.
now base in Singapore.