bash-templater
Simplify Configuration File and Script Generation
bash-templater empowers efficient templating within Bash scripts, streamlining the creation of configuration files, documentation, and more. With its intuitive syntax and powerful features, you can effortlessly craft dynamic output.
TL;DR
Installing:
bpkg install vicentebolea/bash-templater
Using it:
templater vars < file.template
USE ME
You have this file.template
:
# My template
## Author
- @NAME@ <@EMAIL@>
And this rules
file:
NAME=LEOPOLDO WINSTON
EMAIL=leothewinston\@leoserver.com
You execute this command:
templater rules < file.template
You get this:
# My template
## Author
- LEOPOLDO WINSTON <leothewinston@leoserver.com>
The only rule
Escape the @
character like \@
in the rules file.
INSTALL ME
Use the fantastic BASH package manager BPKG and just:
bpkg install vicentebolea/bash-templater
Links
blog comments powered by Disqus