I have the following commands that I would like to run inside each subdirectory of the current working directory. Here are the commands:
OUTPUTFN=`basename $PWD` cat *.xml > $OUTPUTFN.txt mv $OUTPUTFN.txt $OUTPUTFN.xml mv $OUTPUTFN.xml ..
There are over 700 folders in this directory, I want it to go into each, execute those four commands, and then go to the next, execute the commands, and repeat. I've tried combining several samples from this site with my commands but can't get it to work.