aboutsummaryrefslogtreecommitdiff
path: root/text_collector_examples/apt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'text_collector_examples/apt.sh')
-rwxr-xr-xtext_collector_examples/apt.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/text_collector_examples/apt.sh b/text_collector_examples/apt.sh
index 3919b7c..1dddf45 100755
--- a/text_collector_examples/apt.sh
+++ b/text_collector_examples/apt.sh
@@ -5,7 +5,9 @@
5# Author: Ben Kochie <superq@gmail.com> 5# Author: Ben Kochie <superq@gmail.com>
6 6
7upgrades="$(/usr/bin/apt-get --just-print upgrade \ 7upgrades="$(/usr/bin/apt-get --just-print upgrade \
8 | /usr/bin/awk '/^Inst/ {print $5, $6}' \ 8 | /usr/bin/awk -F'[()]' \
9 '/^Inst/ { sub("^[^ ]+ ", "", $2); sub("\\[", " ", $2);
10 sub(" ", "", $2); sub("\\]", "", $2); print $2 }'
9 | /usr/bin/sort \ 11 | /usr/bin/sort \
10 | /usr/bin/uniq -c \ 12 | /usr/bin/uniq -c \
11 | awk '{ gsub(/\\\\/, "\\\\", $2); gsub(/\"/, "\\\"", $2); 13 | awk '{ gsub(/\\\\/, "\\\\", $2); gsub(/\"/, "\\\"", $2);