fixed birdnet_stats.sh failures before extraction

This commit is contained in:
Patrick McGuire
2021-10-07 14:19:04 -04:00
parent b72aa58cc6
commit b428a278f2
2 changed files with 17 additions and 15 deletions
+16 -14
View File
@@ -15,7 +15,7 @@ while true;do
) / | (
"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"+.+"
EOF
if [ "$(find ${EXTRACTED} -name '*.wav' | wc -l &> /dev/null)" -ge 1 ];then
if [ "$(find ${EXTRACTED} -name '*.wav' | wc -l)" -ge 1 ] &> /dev/null;then
a=$( find "${EXTRACTED}" -name '*.wav' \
| awk -F "/" '{print $NF}' \
| cut -d'-' -f1 \
@@ -39,19 +39,21 @@ EOF
echo
echo " -$SOFAR species identified so far"
echo
MOST_RECENT="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \
| sort -t"%" -rk2 \
| head -n1 \
| cut -d'/' -f8)"
AT_TIME="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \
| sort -t"%" -rk2 \
| head -n1 \
| rev \
| cut -d'-' -f1 \
| rev \
| cut -d'.' -f1)"
echo " -Most recent species detection: ${MOST_RECENT//_/ } at ${AT_TIME}"
echo
if [ "${SOFAR}" -ge "1" ];then
MOST_RECENT="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \
| sort -t"%" -rk2 \
| head -n1 \
| cut -d'/' -f8)"
AT_TIME="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \
| sort -t"%" -rk2 \
| head -n1 \
| rev \
| cut -d'-' -f1 \
| rev \
| cut -d'.' -f1)"
echo " -Most recent species detection: ${MOST_RECENT//_/ } at ${AT_TIME}"
echo
fi
if [ ${a} -ge 1 ];then
while read -r line;do
+1 -1
View File
@@ -1,2 +1,2 @@
rpialpha
Wed 06 Oct 2021 07:36:55 PM EDT
Thu 07 Oct 2021 02:19:01 PM EDT