curl -s http://192.168.1.1/zabbix_agent.sh | bash /dev/stdin 192.168.1.1
其中:
zabbix_agent.sh
在其它服务器上已经写好的脚本,使用curl下载,-s
参数表示使用静默的方式,不输出多余的信息
/dev/stdin
是标准输入,
192.168.1.1
是要传递给脚本的参数
curl -s http://192.168.1.1/zabbix_agent.sh | bash /dev/stdin 192.168.1.1
其中:
zabbix_agent.sh
在其它服务器上已经写好的脚本,使用curl下载,-s
参数表示使用静默的方式,不输出多余的信息
/dev/stdin
是标准输入,
192.168.1.1
是要传递给脚本的参数