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 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' \ a=$( find "${EXTRACTED}" -name '*.wav' \
| awk -F "/" '{print $NF}' \ | awk -F "/" '{print $NF}' \
| cut -d'-' -f1 \ | cut -d'-' -f1 \
@@ -39,19 +39,21 @@ EOF
echo echo
echo " -$SOFAR species identified so far" echo " -$SOFAR species identified so far"
echo echo
MOST_RECENT="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \ if [ "${SOFAR}" -ge "1" ];then
| sort -t"%" -rk2 \ MOST_RECENT="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \
| head -n1 \ | sort -t"%" -rk2 \
| cut -d'/' -f8)" | head -n1 \
AT_TIME="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \ | cut -d'/' -f8)"
| sort -t"%" -rk2 \ AT_TIME="$(find ${EXTRACTED}/By_Date/$(date +%Y-%m-%d) \
| head -n1 \ | sort -t"%" -rk2 \
| rev \ | head -n1 \
| cut -d'-' -f1 \ | rev \
| rev \ | cut -d'-' -f1 \
| cut -d'.' -f1)" | rev \
echo " -Most recent species detection: ${MOST_RECENT//_/ } at ${AT_TIME}" | cut -d'.' -f1)"
echo echo " -Most recent species detection: ${MOST_RECENT//_/ } at ${AT_TIME}"
echo
fi
if [ ${a} -ge 1 ];then if [ ${a} -ge 1 ];then
while read -r line;do while read -r line;do
+1 -1
View File
@@ -1,2 +1,2 @@
rpialpha rpialpha
Wed 06 Oct 2021 07:36:55 PM EDT Thu 07 Oct 2021 02:19:01 PM EDT