#!/bin/sh

set -o noclobber

me="packs"

LINE=$("$APT" | "$AWK" -v myhost="$myhost" -v time=`date -u +%s%N`  '{if ($1~/^Inst/) counter=counter+1} END {if (counter) printf "packages,host=%s packs=%si %s\n",myhost,counter,time}')

if [ -n "${LINE##+([[:space:]])}" ]; then # <= FIXME! find a better way.
	writeline "$LINE" "$MAXLINES" "$me"
fi

