#!/bin/bash echo "show slave status\\G" | HOME=/var/lib/zabbix mysql | grep $1 | awk '{ print $2 }' | head -n 1