What does ForDoDone do?
The for ; do ; done; programmatical syntax is also known as a “for loop.” As is the case with many systems admininstration tasks, you have to do things over and over again, to many servers, files, directories, objects, etc. A for loop allows you to automate the process, and iterate over a multitude of items, until the work is done. The for loop exists in most every programming language I can think of, but as it’s named and used here it’s mostly in reference to Bash, as it’s the most common shell for Linux commandline interaction.
Here is a very simple example of a for loop:
# for i in apple orange banana; do echo "$i"; done; apple orange banana #
As you can see it takes a list of fruits, and prints each member of the list.
I chose this name for this blog out of respect, nay: reverence for the for loop construct. It has saved my finger muscles, my sanity, my servers, and perhaps my job on several occasions.
I suppose the easiest way to describe what I am trying to do here is this:
for i in `find /thoughts -type f`; do post_thought_blog $i; done;