I'm scripting the modification of a config file laid out like this:[purple]auth = noenabled = 0username = password =priority = 0host = True[shovel]group = manual = Falseenabled = 0username = Where there are many [categories] and sometimes with the same key of a key/value pair.Is it possible to craft a one-liner using awk/sed/grep/tr/cut/perl that can change the value of enabled = 0 to enabled = 1 but ONLY for the category [shovel]? 
Match a pattern and replace the first instance of string following it
awk;sed;grep;regular expression;perl
In sed you can use a range (stopping on the empty line at the end of the [shovel] category):sed '/\[shovel\]/,/^$/ s/enabled = 0/enabled = 1/' filethe first part /\[shovel\]/,/^$/ means find a line with [shovel], keep going until you find an empty line, and do the following command(s) (in this case a simple s/old/new) only on that part of fileNote in response to comment: As far as I know, sed will not accept alternative delimiters in ranges and addresses (so escape any / characters that must be literal, if you need to match them), but you can still use one in any following commands, for example:sed '/\[shovel\]/,/^$/ s|enabled = 0|enabled = 1|' file