Hi
Im trying to scan a file for certain entries and remove their corresponding lines completely. What I have now is this,
for USER in user1 user2 user3 user4
do
sed '/$USER/d' /etc/sudoers
done
However this doesn't remove the entries at all. Is there another way for this?
Thanks very much
---------- Post updated at 09:11 PM ---------- Previous update was at 09:08 PM ----------
Edit: I think the $ sign gives the wrong info to sed. Should this be enclosed in something?