Browse Source

Account for spaces in repository label (#1348)

Signed-off-by: Jérémy Ruffet <jeremy.ruffet@i-run.fr>
pull/1371/head
Jérémy Ruffet 6 years ago committed by Ben Kochie
parent
commit
03f0b4db9f
  1. 4
      text_collector_examples/apt.sh

4
text_collector_examples/apt.sh

@ -6,8 +6,8 @@
upgrades="$(/usr/bin/apt-get --just-print upgrade \
| /usr/bin/awk -F'[()]' \
'/^Inst/ { sub("^[^ ]+ ", "", $2); sub("\\[", " ", $2);
sub(" ", "", $2); sub("\\]", "", $2); print $2 }' \
'/^Inst/ { sub("^[^ ]+ ", "", $2); gsub(" ","",$2);
sub("\\[", " ", $2); sub("\\]", "", $2); print $2 }' \
| /usr/bin/sort \
| /usr/bin/uniq -c \
| awk '{ gsub(/\\\\/, "\\\\", $2); gsub(/\"/, "\\\"", $2);

Loading…
Cancel
Save