>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:
_at_location_at_=/home/_at_user_at_/somewhere
examplescript:
#!/bin/execlineb -S0
pipeline { redirfd -r 0 example.conf sed -e "s/_at_location_at_/x/g;
s/_at_user_at_/y/g;" }
envfile -
printenv
Unix tools are powerful. Use them. ;)
--
Laurent
Received on Fri Sep 20 2024 - 14:37:21 CEST