56 lines
1.4 KiB
Bash
56 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
for i in $(seq -w 1 57); do
|
|
# Expand matching folders
|
|
matches=( ${i}cube-* )
|
|
|
|
# Case 1: no match (literal string left)
|
|
if [ "${matches[0]}" = "${i}cube-*" ]; then
|
|
echo "❌ No folder found for prefix ${i}cube-xxxxx"
|
|
continue
|
|
fi
|
|
|
|
# Case 2: more than one match
|
|
if [ "${#matches[@]}" -ne 1 ]; then
|
|
echo "⚠️ Multiple folders found for prefix ${i}cube-xxxxx: ${matches[*]}"
|
|
continue
|
|
fi
|
|
|
|
folder="${matches[0]}"
|
|
echo "✅ Found folder: $folder"
|
|
|
|
dataset_dir="$folder/SMALL_DATASET"
|
|
|
|
if [ -d "$dataset_dir" ]; then
|
|
echo " SMALL_DATASET exists"
|
|
|
|
# Count CSV files
|
|
csv_count=$(find "$dataset_dir" -maxdepth 1 -type f -name "*.csv" | wc -l)
|
|
|
|
if [ "$csv_count" -eq 4 ]; then
|
|
echo " ✅ Found 4 CSV files"
|
|
else
|
|
echo " ⚠️ Found $csv_count CSV files (expected 4)"
|
|
fi
|
|
else
|
|
echo " ❌ SMALL_DATASET folder missing"
|
|
fi
|
|
|
|
dataset_dir="$folder/MEDIUM_DATASET"
|
|
|
|
if [ -d "$dataset_dir" ]; then
|
|
echo " MEDIUM_DATASET exists"
|
|
|
|
# Count CSV files
|
|
csv_count=$(find "$dataset_dir" -maxdepth 1 -type f -name "*.csv" | wc -l)
|
|
|
|
if [ "$csv_count" -eq 2 ]; then
|
|
echo " ✅ Found 2 CSV files"
|
|
else
|
|
echo " ⚠️ Found $csv_count CSV files (expected 2)"
|
|
fi
|
|
else
|
|
echo " ❌ MEDIUM_DATASET folder missing"
|
|
fi
|
|
done
|