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
343 B
13 lines
343 B
6 years ago
|
#!/bin/sh
|
||
|
|
||
|
set -o noclobber
|
||
6 years ago
|
|
||
|
me="packs"
|
||
6 years ago
|
|
||
|
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.
|
||
6 years ago
|
writeline "$LINE" "$MAXLINES" "$me"
|
||
6 years ago
|
fi
|
||
|
|