A small adjustment to the awk's printf() call; the positioning of "--" markers. This replaces previous patch.
>From b94d6eb9b267ad80dcd552c35ae0438f8c9c3e5c Mon Sep 17 00:00:00 2001 From: Jari Aalto <[email protected]> Date: Fri, 21 Aug 2009 19:03:21 +0300 Subject: [PATCH] scripts/wnpp-alert.sh: Line-up output and sort by status and package name Signed-off-by: Jari Aalto <[email protected]> --- scripts/wnpp-alert.sh | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/wnpp-alert.sh b/scripts/wnpp-alert.sh index 19fc5d5..8c716ee 100755 --- a/scripts/wnpp-alert.sh +++ b/scripts/wnpp-alert.sh @@ -124,5 +124,22 @@ if [ -f "$WNPP_DIFF" ]; then fi fi -comm -12 $WNPP_PACKAGES $INSTALLED | sed -e 's/+/\\+/g' | \ -xargs -i egrep '^[A-Z]+ [0-9]+ {} ' $WNPP +# - The AWK line-up's the columns. +# - The sort groups packages wirh similar WNPP status together, then +# - sorts by package name + +comm -12 $WNPP_PACKAGES $INSTALLED | +sed -e 's/+/\\+/g' | +xargs -i egrep '^[A-Z]+ [0-9]+ {} ' $WNPP | +wnpp-alert | awk '{ + type = $1 + bug = $2 + pkg = $3 + + re = "^.*" pkg " --" + sub(re, ""); + + printf( "%3s %d %-15s -- ", type, bug, pkg); + print +}' | +sort --ignore-case -k 1,1 -k 3 -- 1.6.3.3
