[CentOS] how to do repetetive command in shell

Thu Oct 21 18:50:23 UTC 2010
Pintér Tibor <tibyke at tibyke.hu>

> USER1="roland"
> USER2="dany"
> USER3="kevin"
> 
> 
> cp -r /opt/$USER1/test /backup/$USER1
> cp -r /opt/$USER2/test /backup/$USER2

$ for user in one two three four; do echo $user; done
one
two
three
four

t