I asked a similar question a while back but I'm hitting a brick wall getting this one to work.
I'm scripting the modification of a config file laid out like this:
[Thing1] [[subthingA]] this = 0 that = string and = localhost the = 80 other = 0 thing_ading = /path/to/a/dir [Thing2] [[subthingB]] this = 0 thing_ading = /path/to/dir here = 0
Where there are N number of [Things], often with the same key and/or value of a key/value pair, and the key/value pairs under the [[subthings]] are indented by exactly 8 spaces. I'm specifically trying to craft a one-liner using awk/sed/grep/tr/cut/perl that can change the value of
SubthingB to a different directory path.
I'm able to edit all
thing_adings and I've been able to target certain pairs, but the spaces are really giving me an issue.