J'ai trébuché sur cette question, alors je me demande comment est-ce possible?
Exécution standard de la commande:
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14
info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000017"
sent: 1; skipped: 0; total: 1
OK, essayons d'obtenir la première ligne uniquement:
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | head -1
sent: 1; skipped: 0; total: 1
Et la tête standard?
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | head
sent: 1; skipped: 0; total: 1
Grep inverse? sed? tee?!?!?!!?
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | grep -v pero
sent: 1; skipped: 0; total: 1
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | sed 's/foo/bar/'
sent: 1; skipped: 0; total: 1
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 | tee
sent: 1; skipped: 0; total: 1
stderr à stdout?
# zabbix_sender -c zabbix_agentd.conf -k mmysql.QCInserts -o 14 2>&1 | tee
sent: 1; skipped: 0; total: 1
Je suis vraiment perplexe ...
tee
? Que se passe-t-il si vous courezzabix_sender <options> 2>&1 | head -1
?