May 13, 2011

Shell programming: Simple for loop to create folders

#!/bin/ksh
# http://www.softpanorama.org/Scripting/Shellorama/arithmetic_expressions.shtml
#let i=3

for i in {0..2}
do
for j in {0..9}
do
let m=i*10+j
echo "m is $m"
mkdir Hello$m
done
done

More resource here

No comments: