diff options
author | SiemKorteweg <Siem.Korteweg@qnh.nl> | 2015-10-04 18:59:28 +0300 |
---|---|---|
committer | SiemKorteweg <Siem.Korteweg@qnh.nl> | 2015-10-04 18:59:28 +0300 |
commit | bf1da50c145e22d672f99b7b1d912508bbed75b5 (patch) | |
tree | a78bd2dea59bedcd13c0acf15c15a7beb7ef5c66 /include/tests_homedirs | |
parent | 6c4b790a22cc87f5cdf9451e36c9a1c06f0c4c95 (diff) |
Combine "sort | uniq" into "sort -u" to reduce the number of processes used for running Lynis. The busybox version of sort also supports the -u option.
Diffstat (limited to 'include/tests_homedirs')
-rw-r--r-- | include/tests_homedirs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_homedirs b/include/tests_homedirs index 012cf648..cfb6f089 100644 --- a/include/tests_homedirs +++ b/include/tests_homedirs @@ -34,7 +34,7 @@ if [ ${SKIPTEST} -eq 0 ]; then # Read sixth field of /etc/passwd logtext "Test: query /etc/passwd to obtain home directories" - FIND=`${AWKBINARY} -F: '{ if ($1 !~ "#") print $6 }' /etc/passwd | sort | uniq` + FIND=`${AWKBINARY} -F: '{ if ($1 !~ "#") print $6 }' /etc/passwd | sort -u` for I in ${FIND}; do if [ -d ${I} ]; then logtext "Result: found home directory: ${I} (directory exists)" |