#!/bin/sh
# This script will create directories named pap*** to pap*** in your
#current working directory. The user will have to provide the values
# For example: 
mkdir.sh 100 150    
# will create pap100, pap101.....pap150 directories
# set $b to first argument
# set $e to second argument
b=$1
e=`expr $2 + 1`
if [ "$b" -gt "$e" ]
then
	exit
else
	if [ "$b" -lt "0" ]
	then
		exit
	fi
fi

# make directory called dir# where # is a number
until [ "$b" -eq "$e" ]
do
	if [ "$b" -lt "10" ]
	then
		mkdir pap00$b
	else
		if [ "$b" -lt "100" ]
		then
			mkdir pap0$b
		else
			if [ "$b" -lt "1000" ]
			then
				mkdir pap$b
			else
				exit
			fi
		fi
	fi
	b=`expr $b + 1`
done