#!/bin/bash
base_dir=""
if test $# -lt 3 ; then echo "usage: $0 basedir detpth1_start_num deptth2_end_num depth2_dir_cnt" exit 1
fi
if test $2 -lt 0; then echo "start num can't less than 0" exit 0
fi
if test $2 -gt $3; then echo "end_num can't less than start num" exit 0
fi
base_dir="$1/"
base_dir=`echo $base_dir |sed 's/\/*$//g'`
for (( i = $2 ; i <= $3; i++ ));do hex=$i newpath="$base_dir/$hex" mkdir -p $newpath
done
|