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:

Carlo Cipolla's Laws of Stupidity

    "By creating a graph of Cipolla's two factors, we obtain four groups of people. Helpless people contribute to society but are...