I\'m writing a simple script to substitute text in an environment variable with other text. The trouble I get is with the substituted or substituted text being pulled from o
The problem with:
echo %a:%c%=thin%
is that it tries to expand two variables: a: and =thin with a c constant string between them.
a:
=thin
c
Try this:
echo echo ^%a:%c%=thin^% | cmd
The first command outputs:
echo %a:fat=thin%
which is piped into a second command shell for evaluation.