envsub file
envsubst < config.txt
# Expected output:
# server: https://gitlab.com/skofgar
# username: foo_user
# password: mymonkey
envsub file
envsubst < config.txt
# Expected output:
# server: https://gitlab.com/skofgar
# username: foo_user
# password: mymonkey
envsub file
# pipe into less
envsubst < config.txt | less
# pipe a deployment "deploy.yml" into kubectl apply
envsubst < deploy.yml | kubectl apply -f -
envsub file
envsubst < config.txt > confidential_config.txt
envsub file
# print content of configuration file
cat config.txt
# expected output:
# server: $SERVER_URL
# username: $USER_NAME
# password: $USER_PASSWORD
# load environment variables
source .env
# replace environment variables in file content
envsubst < config.txt
# expected output
# server: https://gitlab.com/skofgar
# username: foo_user
# password: mymonkey
# replace environment variables and write to new file
envsubst < config.txt > confidential_config.txt
# pipe into less
envsubst < config.txt | less
# pipe a deployment "deploy.yml" into kubectl apply
envsubst < deploy.yml | kubectl apply -f -
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us