When a Unix program opens a file, it gets back a file descriptor. When the program wants to read from a file or write to a file, it must specify the file descriptor of the file on which the operation should be performed. On Unix systems, every process created by the shell has these three file descriptors when they start running. They are normally set to the keyboard, the screen and the screen respectively. This is so that even if a user redirects output away from the screen, he or she is still able to see any error messages.
Pipes are quite convenient.
This can be a difficult operation, since the directory names can refer to symbolic links. The code above assumes that the file dirtydirs contains a list of directory names. It executes the body of the loop once for each directory name. There are two ways to introduce long string literals into shell scripts. The use of quotes around the end delimiter is a bit of magic preventing variable and command substitution in the body of the here document.