I want to check a log into terminal, the logger writes a temperature_log in /var/log . How can I <<cat>> only the last line of the log, so I can append it to the output?
Here is the bad code:
until [ x = 1 ]; do
echo "`cat temperature_log`" #Thats the bad section
I wanted to do sommething like this:
echo "`cat_last_line temperature_log`"
But unfortunately , "cat_last_line" is yet to be invented,
Edit: the logger updates the log every 5 seconds , thats the "sleep 5" for.