A newbie so please excuse
I use the below script to create copies of the same file
for i in {1..5}
do
cp file xfs/file$i
done
To create
file1 file2 file3 file4 file5
My Question is if i wanted to dictate how many files are created how do i do this
I have tried
read -p "How many files do you want" num
for i in {1..$num}
do
cp file xfs/file$i
done
I'm unsure on how to get the "for" command top accept my variable
Any ideas