Closed robertzhangwenjie closed 4 years ago
You didn’t export these variables, so they cannot get into esh
process, obviously. That’s how the shell works.
You can either pass the variables as arguments to esh
(as explained in --help
):
esh ./template/nginx.tpl.esh backend_url=1 location=2
or use shell’s feature to pass environment variables for a command:
backend_url=1 location=2 esh ./template/nginx.tpl.esh
or export variables before executing esh
:
export backend_url=1
export location=2
esh ./template/nginx.tpl.esh
nginx.tpl.esh
The same process that declared a variable will also report an error!