This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Gabe,
>Date: Wed, 20 Apr 2005 17:21:56 -0400 (EDT)
>From: Gabe Langbauer <address@hidden>
>Organization: Ohio State University
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20050420: LDM scour issue and computer lock-up
>Keywords: 200504191903.j3JJ3u4n010376
The above message contained the following:
> Both scripts also give the answer DAY_OFFSET=1
Odd. I expected one of them to fail.
Let's make a slight change that brings the script closer to the one that
failed. What does this script do?
dayOffsetName=scour_$$
touch /tmp/$dayOffsetName
sleep 2
cd /tmp
if find . \! -name . -prune -mtime 0 -name $dayOffsetName |
grep $dayOffsetName >/dev/null 2>&1; then
echo DAY_OFFSET=1
elif find . \! -name . -prune -mtime 1 -name $dayOffsetName |
grep $dayOffsetName >/dev/null 2>&1; then
echo DAY_OFFSET=0
else
echo "Couldn't discover meaning of '-mtime' argument of find(1)"
exit 1
fi
Make sure that you're executing the script with the same user-shell that
crontab(1) will use.
Regards,
Steve Emmerson