Hello all,
I have search the forum and could not find an answer...Here is what I am trying to do. Every 15 minutes, a script send uptime output to a logfile (dailylog.log), that file contains lines like the one below:
Code:
11:21am up 44 days, 19:15, 1 user, load average: 0.00, 0.02, 0.03
Now, I am trying to extract only the before last line and send it to another file. The thing is that using tail -2 will show me the last 2 lines... I don't need that last line. The log is growing every 15 minutes so I don't know how many entries there are in the file.
Code:
echo $(tail -10 /dailyload.log)
Does anyone have a suggestion?