Find all files with the extension ".txt" in the current directory and its subdirectories, randomly select 50 of them, and save them to a new file with the name of the original file plus ".shuf.txt".
find ~ -type f -iname '*.txt' | xargs -I {} shuf -n 50 -e {} -o {}.shuf.txt