Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Corona688
9,611
Posted By Corona688
This is going to be a bit large to fit in one...
This is going to be a bit large to fit in one cron line, it ought to be a script:

#!/bin/sh

INPUTFILE=/my_dir_name/my_Filename
TMPFILE=/tmp/.lastupdate

if [ -f /tmp/.lastupdate ]
then
...
9,611
Posted By Corona688
What's your system?
What's your system?
9,611
Posted By Corona688
Of course not, that's what touch is for. It...
Of course not, that's what touch is for. It creates and/or updates its own temporary file.

It just uses the temporary file as a timestamp, "refreshing" it after it processes the data. If the...
9,611
Posted By Corona688
Instead of worrying about calculating 'a week...
Instead of worrying about calculating 'a week ago', let cron do that work. Just keep a temp file that you touch whenever you update the data. If the input datafile is newer than your tempfile -- or...
Showing results 1 to 4 of 4

 

Featured Tech Videos

All times are GMT -4. The time now is 08:53 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy