I need to find a list of all subdirectories of $dir1 that contain word "TEST", and not just at the end, but anywhere in the path.
I am using the following:
find $dir1 -type d -name '*'$word'*' -print
it is working but seems to only retrieve those path that end with TEST:
For example /01/data/TEST contains a subdirectory lists but it does not output /u10/data/TEST/lists
How can I modify my code to display subdirectories of TEST as well?