Hey please upload all videos of php mysql . I had seen all your other videos and still waiting only for your videos . Your explation and teaching way is so simple and impressive . I didnt want to watch videos of another channel . Please upload fast .
IIRC, the lines are not saved until you exit, when using cat. You're not inside the file, you're just interactively providing the standard input.
You say to create a text file in Linux, you "use the cat command", which needs clarification: it's just one of a great many ways to create a file which may or may not contain plain text. For example, using any number of editors out there, like nano, vim, gedit, pluma, etc, or even simply using touch.