Take all the files with the extension .txt in the current directory, randomly select one of them, take the first line of that file, and then print the contents of that file.
shuf -e *.txt | head -n 1 | xargs -I '{}' cat '{}'