Get telemetry history from influx on CUBEs
This commit is contained in:
55
Python/check_folders.sh
Normal file
55
Python/check_folders.sh
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user