I would like to write a script that would create 1000 files like clm0001.txt to clm1000.txt. All the files would contain the same contents. How do I achieve this using a script?Please help.
One way, assuming you have the content of the files in a file "clm.txt":
awk 'BEGIN{
for(i=1;i<1001;i++)
system("cp clm.txt clm" sprintf("%04d.txt", i))
}'
#/bin/sh
for i in $(seq 1 1000); do
cp original.txt $(printf "clm%04u.txt" $i)
done