replacing parts of a line in a file (/etc/group).
If I have the following line in my group file, I want to remove all of the "sdb" entries, but leave anything else. For instance:
would need to be changed to:
I'm trying to do this with perl -pi -e if I can. This SORT of gets me there, but removes the "david" entry.
egrep "^sdba:" $TEMP && perl -pi -e "s/^sdba::.*/sdba::1014:/g" $TEMP