9 lines
271 B
Bash
Executable File
9 lines
271 B
Bash
Executable File
#!/bin/bash
|
|
if [ "$#" -ne 1 ] ; then
|
|
echo "Usage: $0 <env_file>" >&2
|
|
echo "This script read env_file variables and replace theire occurences in stdin" >&2
|
|
exit 1
|
|
fi
|
|
|
|
bash -c 'set -a && . '"$1"' && envsubst "$(cat '"$1"' | grep -o ^.*= | sed "s/=//" | sed "s/^/$/")"'
|