Hi everyone
My issue is this, I need to list all the sub directories in a directory that contains files that have the extension *.log, *.dat and *.out . After reviewing the output i need to delete those directories i do not need. I am running Solaris 10 in a bash shell. I have a script that I believe will list the directories that I was hoping someone here could verify the syntax but I still need a way to delete them without having to do rm -R for each one.
find ABC/ \( -name "*.out" -o -name "*.log" -o -name "*.dat" \) -print | while read f
do
echo "${f%/*}"
done | sort -u
ABC= name of directory
Thanks in advance