[ ] Linted your code? (make test should do the trick)
With the corrected awk/sed command, only keys from the specified section are now read - previously keys from other sections were determined. However, there is now a problem that values without section are not read anymore, because added keys without section are subordinated to the last section and therefore belong to the last section - but that's a different PR ;) (perhaps by specifying a default section)
functionality:
determining the section (sed)
determining the key (sed)
ignore spaces around the separator (=) (sed)
removing leading and trailing spaces from the value (awk)
Thanks for contributing to b3bp! As part of your PR, have you:
make test
should do the trick)With the corrected awk/sed command, only keys from the specified section are now read - previously keys from other sections were determined. However, there is now a problem that values without section are not read anymore, because added keys without section are subordinated to the last section and therefore belong to the last section - but that's a different PR ;) (perhaps by specifying a default section)
functionality: