read -r; refactoring

as per https://mywiki.wooledge.org/BashFAQ/001
This commit is contained in:
Patrick Schleizer 2019-12-09 02:23:43 -05:00
parent 7467252122
commit 02165201ab
No known key found for this signature in database
GPG Key ID: CB8D50BB77BB3C48

View File

@ -3,8 +3,7 @@
config_file="/etc/permission-hardening.conf"
set_file_perms() {
while read line
do
while read -r line; do
[[ "$line" =~ ^#.*$ ]] && continue
file="$(awk '{print $1}' <<< ${line})"