>OK > >for i in `ls /dirname`; > >the phrase in backquotes will become the output of the program called--a list of files > >the for statement is a for statement as in so many program languages. i is just a >variable that will >be assigned each of the filenames in succession. /dirname is the hypothetical name >of the directory >where the files exist. (You fill in your own directory name there). The | (pipe) >symbol of the original >proposed script said send all the output of the ls command to the program grep. We >can leave that out >without losing much more than a little efficiency, since grep would take only files >that matched the >pattern .+ .+ (at least one character followed by an embedded blank followed by >another character) > >do mv $i `echo $i | gawk '{ gsub(_, ,$0) }'` ; done > >the do is simply the sub-block where everything will happen and the instruction is mv >(move) which >renames files the $i means (evaluate the variable i here) so it is each filename in >succession, and again we >want to call output of a program(s) echo just sends the value of i through a pipe to >gawk, and >the gawk command is gsub(_, ,$0) which says globally substitute _ for ' ' in the >whole line that is passed >to you. Then we have some syntax to say "Thus endeth the loop begun with for". > > >Civileme Civileme, Carroll, Kirby... thanks. Ya know, it actually makes sense. I understood the concept of the for loop, but the rest was without meaning to me, especially .+ .+. And gawk... sounds like someone is choking. Thanks for taking care of us lower on the food chain. <g> Dean -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- "The way I see it, there were two great triumphs, two things that I'm proudest of. One is the economic recovery, in which the people of America created - and filled - 19 million new jobs. The other is the recovery of our morale. America is respected again in the world and looked to for leadership." -Ronald Reagan's Farewell Address
Want to buy your Pack or Services from MandrakeSoft? Go to http://wwww.mandrakestore.com