File size: 488 Bytes
7d7a078
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

partial_filename=".all2all.json"
directories=$(find . -mindepth 1 -maxdepth 1 -type d)

# count how many folders in this dir
count=$(echo $directories | wc -w)

if [ $count -eq 0 ]; then
    echo "No directories found."
    exit 1
else
    echo "Found $count directories:"
    echo $directories
fi

for dir in $directories; do
    if [ ! -e "$dir"/*"$partial_filename" ]; then
        echo "Directory '$dir' does not contain a file matching '$partial_filename'."
    fi
done