Objective: Remove instances of the 'nis' string only from these two lines: 'passwd: files nis sss' and 'group: files nis sss' at /path/to/nsswitch.conf (some other 'nis' strings exist at the 'group: files nis sss' line and elsewhere... so we'll leave them as is and narrow down the hits to the '^passwd' and '^shadow' lines only) and call the string-manipulation command/s via sudo.
Any way to keep the whitespaces or tab stops when I use /usr/bin/ex?