I need to create several files using a shell script. So far I have this and works.
#!/bin/bash
var1="VALUE 1"
var2="VALUE 2"
ext="cfg"
cat > file1 << EOF1
do some commands on "$var1"
and/or "$var2"
EOF1
Now I have to create 50 files and the 50 files will have the same text just a few changes and I'm planning to use variables for the changes.
My question is how do I create the 50 files (each file needs to have a specific name but all have the same extension. (.cfg)