From 392f631c631caa12fbdef70d1c414ebd87542259 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 20 Jul 2022 11:06:27 +0100 Subject: [PATCH] Bin: NessusComplianceFilter: add to help After talking to Scot, I thought it may be helpful to add an example awk command for grouping rows. In the example added, awk will show only the compliance name, along with a comma seperated list of ip addresses --- bin/.bin/nessusComplianceFilter | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/.bin/nessusComplianceFilter b/bin/.bin/nessusComplianceFilter index 39877d26..a3a0a869 100755 --- a/bin/.bin/nessusComplianceFilter +++ b/bin/.bin/nessusComplianceFilter @@ -14,6 +14,12 @@ printhelp(){ echo "e.g." echo "cat example.nessus | nessusComplianceFilter \"^18.\" \"Defender\"" echo "will output a tsv containing all failures (or warnings) that start with '18.' and contain the word 'Defender'" + echo "" + echo "It has been built with extensability in mind. It should work well with other unix-y tools" + echo "" + echo "e.g. Only show the name and ip addresses grouped" + echo "cat example.nessus | nessusComplianceFilter | awk awk -F \$'\t' 'NR>1{arr[\$1] = arr[\$1] \$6 \", \"}END{for (a in arr) print a \"\\t\" arr[a]}'" + exit 0 }