Originally Posted by pixellany
This may not be doing what you think....
First, it appears to be looking for any number of "tab" or space characters in several places. Is that relevant to your problem?
Second the "I" or "i" at the end of the s command makes it case-INsensistive, but just for the s command. This is a Gnu extension, which I found here:
Regardless of the spaces and tabs, it's finding lower case "x", and then doing the substitution on "y" or "Y".
The "tabs" and "spaces" are very much relevant and I think it's working exactly as expected.
The problem I had was regarding, yp.conf
domain <domainname> server <servername>
The domain in NIS is case sensitive but the servername is case insensitive.
I had to write a script to find and modify server name for a particular domain
So, I had to look for case-sensitive <domainname> and then replace all occurrences of <servername> with the new server.
The x in my sed command denotes the domainname and y/Y is for server