I am attempting to write a bash script to configure various aspects of a server. The context here is replacing a value of a variable in a conf file (ini format) with another
awk '/^[ssh-iptables/ {ok=1} ok==1 && $0="enabled = false" {print " enabled = true"; ok=0 ; next} {print $0} ' infile > tmp mv tmp infile