I have a directroy which consists of 'n' number of sub directories. Following is the structure:
RootDir ->
SubDir1 ->
test.xlsx
test.tab
SubDir2 ->
test.xlsx
As shown above SubDir1 has both files .xlsx and .tab and SubDir2 have only .xlsx. Like this I have 'n' number of subdirectories, and willing to count only .xlsx from the folders where .tab file is also present.
I wanted to do it using shell scripting.
The present code returning me count of .xlsx files. But, it also includes the .xlsx files where .tab fiiles are not present.
find . -name '*.xlsx' -type f