IMP(shellcheck): fix quote placement in awk (SC1083)

This commit is contained in:
Thibault Ayanides
2020-12-07 15:01:22 +01:00
parent 8012234096
commit ac66cdacd0
9 changed files with 30 additions and 30 deletions

View File

@ -21,11 +21,11 @@ ERRORS=0
# This function will be called if the script status is on enabled / audit mode
audit() {
RESULT=$(get_db passwd | cut -f1 -d":" | sort -n | uniq -c | awk {'print $1":"$2'})
RESULT=$(get_db passwd | cut -f1 -d":" | sort -n | uniq -c | awk '{print $1":"$2}')
for LINE in $RESULT; do
debug "Working on line $LINE"
OCC_NUMBER=$(awk -F: {'print $1'} <<<$LINE)
USERNAME=$(awk -F: {'print $2'} <<<$LINE)
OCC_NUMBER=$(awk -F: '{print $1}' <<<$LINE)
USERNAME=$(awk -F: '{print $2}' <<<$LINE)
if [ $OCC_NUMBER -gt 1 ]; then
# shellcheck disable=2034
USERS=$(awk -F: '($3 == n) { print $1 }' n=$USERNAME /etc/passwd | xargs)