A comment here would have saved me a lot of think, something like "Output the template content, substituting the current value for any shell variable referenced by ${<NAME>} ."