#!/bin/bashPWDD=`pwd`DIRRD="$PWDD/`find $PWDD -mindepth 2 -maxdepth 2 -type d`"for childdir in $DIRRDdo cd $childdir mv *.txt ..doneexit 0