Originally Posted by tommytomthms5
can you break down the code so i learn it thats the point not to run it
Time for a book. I would start with Bash Guide for Beginners by Machtelt Garrels---free at http://tldp.org
To give you a head start, the example given is a "for loop"--one of many kinds of loops that are a staple of any programming language. In Bash, the basic syntax is:
for <conditions>; do
"conditions" can be a variety of things. In the 1st example, the construct:
for i in $(ls 1)
translates as follows:
run the ls command on the directory "1"
take this list and iterate through it, assigning each successive filename to the variable "i"
In this case, the loop finishes simply when it reaches the end of the list.