#!/bin/bash #Directory creation of new coming batch script composed by Durgesh on 16.07.2014 :) no=100; #here $no is the no. of student in any programm for((i=1;i<=$no;i++)) do if test $i -lt 10 then #change the prefix for mail id accordingly id='IMB201400'$i; else if test $i -gt 9 && test $i -le 99 then id='IMB20140'$i; else id='IMB2014'$i; fi fi #echo $id # create the directory mkdir $id echo 'Successfully created the directory!' done