Need help with sed wildcard substitution
by woodson2 from LinuxQuestions.org on (#5PYSE)
I need help with wildcard substitution.
Essentially I want to change yes to no with all lines starting with IPV6.
I think I need help with grouping?
egrep ^IPV6*.*=yes /etc/sysconfig/network-scripts/ifcfg-
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=yes
sed 's/^IPV6*.*=yes/^IPV6*.*=no/g' /etc/sysconfig/network-scripts/ifcfg-ens192
^IPV6*.*=no
^IPV6*.*=no
^IPV6*.*=no
^IPV6*.*=no
Essentially I want to change yes to no with all lines starting with IPV6.
I think I need help with grouping?
egrep ^IPV6*.*=yes /etc/sysconfig/network-scripts/ifcfg-
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=yes
sed 's/^IPV6*.*=yes/^IPV6*.*=no/g' /etc/sysconfig/network-scripts/ifcfg-ens192
^IPV6*.*=no
^IPV6*.*=no
^IPV6*.*=no
^IPV6*.*=no