Earlier quoted context omitted.
It also depends on Ruby and liquid templates. I am not sure how he can still claim it is "plain shell scripts"
Bash has it's own substitution system built in, though I would usually use sed for this task. http://tldp.org/LDP/abs/html/string-manipulation.html See the section under Substring Replacement.
Even M4 macros may work. It would be still more in the shell spirit than ruby gems.