#!/bin/bash cd /srv/recording find -name "*.flac" -mmin +1 | while read f; do if ! test -e silence/"$f".txt; then echo "$f" nice -n19 ffmpeg -hide_banner -i $f -af silencedetect=duration=30 -f null - 2>&1 silence/"$f".txt fi done