-1

I want to make the following directories using shell script,

00, 01, 02, ..., 50 

I have tried the script as follows:

for ((1;i<=${1};i=i+1)) do mkdir ${i} done 

But I get

0, 1, 2, ..., 50 

How to modify the script? thanks.

2

1 Answer 1

0
for i in $(seq -f "%05g" 0 50) do mkdir $i done 

should do the trick.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.