Skip to content

Instantly share code, notes, and snippets.

@abhishekmurthy
Created January 4, 2013 10:03
Show Gist options
  • Save abhishekmurthy/4451402 to your computer and use it in GitHub Desktop.
Save abhishekmurthy/4451402 to your computer and use it in GitHub Desktop.
Script to create nested directories for IS department
#!/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