Created
January 4, 2013 10:03
-
-
Save abhishekmurthy/4451402 to your computer and use it in GitHub Desktop.
Script to create nested directories for IS department
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for (( i=1; i<=13; i++ )) | |
do | |
mkdir lab_$i 2> /dev/null | |
cd lab_$i | |
for ((j=1; j<=100; j++)) | |
do | |
if test $j -lt 10 | |
then | |
mkdir 1PI09IS00$j | |
else | |
if test $j -lt 100 | |
then | |
mkdir 1PI09OIS0$j | |
else | |
mkdir 1PI09IS$j | |
fi | |
fi | |
done | |
cd .. | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment