0

So I have this script

echo how many files you want to create?
read n
for i in {1..$n}
do
touch $i
done
echo $i files created.

So when I run it and specify e.g. 3 files then it creates one file as {1..3} Can someone please help?

Expecting to get 3 files as 1, 2 and 3

Barmar
  • 741,623
  • 53
  • 500
  • 612

0 Answers0