I use envsubst to substitute environment variables to a file in linux.
envsubst < task-definition.json > new-task-definition.json
How to achieve this feature in windows using default resources or using a 3rd party tool?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
I don't directly know of a built in substitute for the
envsubst command in Windows. However as you've made 3rd party tools an option, I would recommend MinGW, a minimalist GNU package for Windows users. It also comes with a
envsubst implementation for Windows.
CygWin could also be an option. It provides a more complete collection of GNU tools and other Open Source tools for Windows (comes also with a POSIX API for Windows for example). It should also have an
envsubst but as I don't have CygWin locally I cannot confirm this.
I would go for MinGW though as the extra functionnalities CygWin provides (POSIX environment) are not needed for
envsubst but the choice is up to you (this SO post and this article may help you make a decision).
Packet in Ubuntu/Debian
envsubst with same functional.
Online documentation for