diff --git a/atomics/T1123/src/T1123.sh b/atomics/T1123/src/T1123.sh index ac9232da..75b78145 100644 --- a/atomics/T1123/src/T1123.sh +++ b/atomics/T1123/src/T1123.sh @@ -24,9 +24,11 @@ osascript -e ' ' "${OUTPATH}" ${DURSEC} # check file is created and a decent size (empty recording is still ~62KB) -RECSIZE=`cat ${OUTPATH} | wc -c` -if [ $RECSIZE -gt 100000 ]; then - echo "Audio data present" && exit 0 +if [ -f "${OUTPATH}" ] ; then + RECSIZE=`stat -f '%z' ${OUTPATH}` + if [ $RECSIZE -gt 100000 ]; then + echo "Audio data present" && exit 0 + fi fi echo "Failed" exit 1 \ No newline at end of file