IMP(shellcheck): quote variables (SC2086)

This commit is contained in:
Thibault Ayanides
2020-12-07 17:11:32 +01:00
parent 6826f377e6
commit b09b75a51e
24 changed files with 142 additions and 142 deletions

View File

@ -23,10 +23,10 @@ RESULT=''
# This function will be called if the script status is on enabled / audit mode
audit() {
info "Checking if accounts have a legacy password entry"
if grep '^+:' $FILE -q; then
RESULT=$(grep '^+:' $FILE)
if grep '^+:' "$FILE" -q; then
RESULT=$(grep '^+:' "$FILE")
crit "Some accounts have a legacy password entry"
crit $RESULT
crit "$RESULT"
else
ok "All accounts have a valid password entry format"
fi
@ -34,12 +34,12 @@ audit() {
# This function will be called if the script status is on enabled mode
apply() {
if grep '^+:' $FILE -q; then
RESULT=$(grep '^+:' $FILE)
if grep '^+:' "$FILE" -q; then
RESULT=$(grep '^+:' "$FILE")
warn "Some accounts have a legacy password entry"
for LINE in $RESULT; do
info "Removing $LINE from $FILE"
delete_line_in_file $FILE $LINE
delete_line_in_file "$FILE" "$LINE"
done
else
ok "All accounts have a valid password entry format"