Randomly select a number between 0 and 50 and use it to print the lines in the file.txt between the lines that do not contain the number and the line that does not contain a period.
shuf -i 0-50 -n 1 | xargs -I {} sed -n '/[^{}]/,/[^.]/p' file.txt