On Mon, Jun 04, 2018 at 07:38:20AM -0400, Bernard Fay wrote:
> The problem is that an entry like "/root" will overwrite an exiting entry
> or "/root/.cshrc" therefore creating a double entry for "/root" and adding
> a new entry for "/root/.cshrc".
Simply rewrite the ENTIRE file. Done.
> PERMFILE=permissions.local
> for VAL in ${ELMT[*]}; do
STOP using all-caps variable names.
A full array expansion should be "address@hidden" with @ sign and quotes.
> sed -i
Editing files with a shell script is just fundamentally broken. Don't
try it. Write the entire new file out.