I am trying to write a bash script which will fill a file in a for loop, such that if I run the script with argument 3 it will create the file with 3 lines.
This is the script that I came up with. But it creates the file with only one line.
#!/bin/bash
for i in $1
do
cat > $PWD/http_file$1.csv <<EOF
host_$i,8080,app_$i,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
EOF
cat $PWD/http_file$1.csv
done