Re: how to do repetetive command in shell

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> 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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux