#!/bin/bash

if [ $# -ne 3 ]; then
  echo "Usage: $0 <directory_name> <start_number> <end_number>"
  exit 1
fi

directory_name=$1
start_number=$2
end_number=$3

# Validate start and end numbers
if ! [[ $start_number =~ ^[0-9]+$ ]] || ! [[ $end_number =~ ^[0-9]+$ ]]; then
  echo "Start and end numbers must be integers."
  exit 1
fi

# Create directories
for ((i = start_number; i <= end_number; i++)); do
  directory="${directory_name}${i}"
  mkdir "$directory"
  echo "Created directory: $directory"
done

~