Change syntax for parsing configured vars

* Use each_line instead of split
* Use grep with a block instead of grep/map