Skip to content

Commit

Permalink
Account for spaces in repository label (#1348)
Browse files Browse the repository at this point in the history
Signed-off-by: Jérémy Ruffet <jeremy.ruffet@i-run.fr>
  • Loading branch information
jruffet authored and SuperQ committed Jun 5, 2019
1 parent c39f674 commit 03f0b4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions text_collector_examples/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 03f0b4d

Please sign in to comment.