With this issue, you can simply use the sed command to fix this issue

sed '5!d' file

Get specific line from text file using just shell script

Read a Specific Line From a File in Linux