How to get the last line of a file using cat command

cat, macos, shell, unix

Solution

Don't use `cat`. `tail` was meant for this usecase exactly:

$ tail -1 ./test.properties

Problem

I am writing a shell script in OSX(unix) environment. I have a file called `test.properties` with the following content: `cat test.properties` gets the following output: ``` //This file is intended for //blah blah purposes 123 ``` Using `cat` command, how can I get only the last line of the file ?

Original source