Very basic question, regarding redirects

From: Scott Mebberson <scott_at_scottmebberson.com>
Date: Mon, 11 May 2015 21:22:41 +0930

I'm working on an addition to the s6-overlay project. I want to make it
super easy to create environment variables within a Docker container.

To execute the script:

script_name env_var_name env_var_value

This would create a file at /var/run/s6/container_environment/ENV_VAR_NAME,
with the content of env_var_value.

I have almost finished the execline script:

#!/usr/bin/execlineb -S0

if { s6-test $# -eq 2 }

backtick -in FILENAME {
    pipeline { s6-echo "${1}" }
    tr "a-z" "A-Z"
}
import -u FILENAME

The next step, I presumed was something like:

echo ${1} 1> /var/run/s6/container_environment/${FILENAME}

But I can't get it to work. I guess redirection isn't supported? I've got
no idea really, I'm lost!

Thanks in advance for any help!
Received on Mon May 11 2015 - 11:52:41 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC