Buffer file before modifying it
This commit is contained in:
parent
1dee476771
commit
5730d3c060
@ -111,5 +111,7 @@ for file in /etc/shadow /etc/gshadow; do
|
||||
"/^$name:/d" \
|
||||
"$file"
|
||||
fi
|
||||
done < "$file"
|
||||
# Not useless use of cat. We're buffering the file here to avoid conditions
|
||||
# where we edit the file we're reading and face issues.
|
||||
done < <(cat "$file")
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user