zgrep -hでファイル名を表示させない。
for host in server1 server2 server3; do printf "${host} "; ssh $host 'zgrep -h \"-\" /var/log/httpd/access_log.201410*' >> hoge.log done
zgrep -hでファイル名を表示させない。
for host in server1 server2 server3; do printf "${host} "; ssh $host 'zgrep -h \"-\" /var/log/httpd/access_log.201410*' >> hoge.log done