Extract of configuration file.
members server1.domain1.com,server2.domain2.com,server3.domain3.com
I am writing a script to remove the server members from a conf file. When I run the script the corresponding server should be removed from the file.
/root/server-remove.sh server1.domain1.com
or
/root/server-remove.sh server3.domain3.com
Both of the above commands should remove the corresponding server from file. As the server name can end in comma or without comma, I am not able to use pattern replacement using sed. Please help me.