I need to create a batch file that writes a text file (possibly including variables). In Unix with bash this is trivial:
#!/bin/bash
ver="1.2.3"
cat > file.txt <<EOL
line 1, ${ver}
line 2
line 3
...
EOL
What is the simplest way to do this with a batch file?
Note: there is a complete solution using an 'heredoc' routine at heredoc for Windows batch? but it seems too complex for ad-hoc use. I'm looking for a quick and simple way.