easybake
April 30th, 2009, 12:26 AM
Here is the situation I have got my self into: My main goal is to monitor the temperatures of my desktop(running Windows XP) with my laptop(running Ubuntu).
Currently I have my XP Desktop updating a log file with the temperatures. I then use my laptop to grab the log file using sftp.
However, this is where I run into a problem, the log files are created daily. The have titles like "CT-Log 13-24-59 May-28-2009.csv" (The 13-24-59 means 1:24pm and 59 seconds, which is irrelevant).
In the bash script I'm making, I only want to deal with the newest log file.
Is there some way within the script to reference only the newest log file in a folder?
Currently I have my XP Desktop updating a log file with the temperatures. I then use my laptop to grab the log file using sftp.
However, this is where I run into a problem, the log files are created daily. The have titles like "CT-Log 13-24-59 May-28-2009.csv" (The 13-24-59 means 1:24pm and 59 seconds, which is irrelevant).
In the bash script I'm making, I only want to deal with the newest log file.
Is there some way within the script to reference only the newest log file in a folder?