diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-08-26 15:05:20 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-08-26 15:05:20 +0300 |
commit | fdf3ded89f7a205a69d150f2ba629f68ca46db5f (patch) | |
tree | 506553e28d73f10b15fcef040c521e038d291346 /include/helper_show | |
parent | 8de53d87beefefca562e083d4b6722020c9c4f64 (diff) |
New command 'lynis show details' to display test details
Diffstat (limited to 'include/helper_show')
-rw-r--r-- | include/helper_show | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/helper_show b/include/helper_show index db5d6724..09baa9fa 100644 --- a/include/helper_show +++ b/include/helper_show @@ -209,6 +209,18 @@ if [ $# -gt 0 ]; then "dbdir") ${ECHOCMD} "${DBDIR}" ;; + "details") + if [ -z "${LOGFILE}" ]; then DisplayError "Could not find log file to parse"; fi + if [ $# -eq 1 ]; then + DisplayError "Provide a test ID" + else + shift + if [ $# -eq 1 ]; then + TESTID="$1" + awk -v search="Performing test ID $TESTID" '$0 ~ search {++f;p=1}p&&f==1;/===---/{p=0}' ${LOGFILE} + fi + fi + ;; "groups") ViewGroups ;; |