Created
March 26, 2022 01:17
-
-
Save zaourzag/60ac4fdc793591aa2a7a3ba71d814a47 to your computer and use it in GitHub Desktop.
Bash script to generate configuration file from template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPTION_1=${OPTION_1} | |
OPTION_2=${OPTION_2} | |
OPTION_3=${OPTION_3} | |
OPTION_4=${OPTION_4} | |
OPTION_5=${OPTION_5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# do something and set the options | |
OPTION_1=foo | |
OPTION_2=bar | |
OPTION_3=lorem | |
OPTION_4=ipsum | |
OPTION_5=dolor | |
# generate config file | |
eval "echo \"$(cat conf.tpl)\" > xxx.conf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment