You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
362 B
13 lines
362 B
#!/bin/sh |
|
|
|
set -o noclobber |
|
|
|
HOME=$(dirname $0) |
|
. "$HOME"/master |
|
|
|
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" |
|
fi |
|
|
|
|