alex
2024-12-23 11:09:15 UTC
Reply
Permalink├── makefile
├── snippet.txt
└── template.txt
$ cat makefile
test:
sh -c "input=$(cat snippet.txt) envsubst < template.txt > output2.txt"
$ cat snippet.txt
xxx
yyy
zzz
$ cat template.txt
START
$input
END
$ input=$(cat snippet.txt) envsubst < template.txt > output1.txt
$ make
sh -c "input= envsubst < template.txt > output2.txt"
I point out that after "input=" maybe something is missing
Anyway let's check the outputs
$ cat output1.txt
START
xxx
yyy
zzz
END
OK
$ cat output2.txt
START
END
As you can see it's missing
Why?