Find all files up to 3 levels deep, shuffle them, sort them, and print the lines that do not end with 4 digits or 8 digits separated by a hyphen, along with the line numbers.
grep -vnP "\b\d{4}(?:-\d{4})?$" <(sort <(shuf $(find -maxdepth 3 -type f)));