#!/bin/bash
#                      /usr/local/bin/silverlog
# http://crystalfaeries.net/posix/bin/silverlog
# celeste:crystalfaery 2016-07-03 16:32:29+00:00
# Aggregate silver price logs from all hosts

# user selected parameters: 
silver_log=/usr/local/share/ag/silverlog.txt	# where does silverd log?

# the agregation code is lazily coded to poll self and maybe fail doing so
for host in fey pixy faerie
do
	rsync -auvzH $host:$silver_log /tmp/$$.$host.silverlog.txt >& /dev/null
done
# include our own local log for certain
cp $silver_log	/tmp/$$.localhost.silverlog.txt

# the actual aggregation
cat		/tmp/$$.*.silverlog.txt		| sort -u > $silver_log

# clean-up
rm		/tmp/$$.*.silverlog.txt


syntax highlighted by Code2HTML, v. 0.9.1