Your sample from post#1 can be improved like this
Code:
sed -i '/GRUB_COLOR_NORMAL=/ s|light-gray/black|white/black|' /etc/default/grub
The s (substitute) command replaces only the right side.
The | delimiter does not clash with the / characters in the search and substitution strings.
A rather theoretic problem with this is, the /search/ can match on the right side and the |search| can match on the left side.
If you want to fly to the moon you are better off with
Code:
sed -i 's|\(GRUB_COLOR_NORMAL=\)"light-gray/black"|\1"white/black"|' /etc/default/grub