Ben Zaningnomon@mastodon.social
Nov 17, 2026, 4:57 AMdeclare -a hz_samples_fn; ((0==${#hz_samples_fn[@]})) && mapfile -t hz_samples_fn < <(find /dir/to/files/ -name '*.flac' -type f -size -2M -exec metaflac --show-sample-rate --show-total-samples '{}' ';' -print); printf '%s\n' "${hz_samples_fn[@]}" | awk -v threshold=30 '1==(FNR%3){hz=$1; getline; samples=$1; getline; dur=samples/hz; if (dur < threshold) print dur, $0; dur=samples=hz=1; next}'