Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 733 Bytes

README.md

File metadata and controls

41 lines (29 loc) · 733 Bytes

BASH Templater

Very simple templating system that replace {{VAR}} by $VAR environment value Supports default values by writting {{VAR=value}} in the template

Author

Sébastien Lavoie [email protected]

Johan Haleby

See http://code.haleby.se/2015/11/20/simple-templating-engine-in-bash/ and http://blog.lavoie.sl/2012/11/simple-templating-system-using-bash.html for more details

Usage

VAR=value templater.sh template

Read variables from file:

templater.sh template -f variables.txt

e.g.:

# variables.txt
# The author
AUTHOR=Johan
# The version
VERSION=1.2.3

Don't print any warning messages:

templater.sh template -f variables.txt -s

Examples

See examples/