I wanted to ask whether variable substitution could be added to the envfile
program of execline.
No.
example.conf
| ${A}=/home/${USER}/somewhere
examplescript
| #!/bin/execlineb
|
| define A x
| define USER y
|
| envfile example.conf
|
| printenv
should print x=/home/y/somewhere
You can instantiate a configuration file before feeding it to envfile:
example.conf:
@location@=/home/@user@/somewhere
examplescript:
#!/bin/execlineb -S0
pipeline { redirfd -r 0 example.conf sed -e "s/@location@/x/g;
s/@user@/y/g;" }
envfile -
printenv
Unix tools are powerful. Use them. ;)
--
Laurent