process csh line by line items properly
Posted on 2006-11-19
I have a csh script that reads files names line by line and acts on each file name (for eg:recursive chmod -R or some sort of conversion on the file eg: change its data format type from iff to some other etc)
I find that sometimes if it takes a long time to chmod a particular file, and if the script has already read in the next filename then it breaks the previous action on the previous file, and goes on to the newly read file. In other words, some previous pipe is broken.
IS there some way to spawn each action on each file as it is read separately?
What exactly is going on here? Why does the previous action on the file break if it takes a long time to complete?