#!/bin/sh
cd $HOME/public_html
newest=`sed -ne 's/^.*URL=\([^"]*\)".*$/\1/; p; ' newest.html`
# 10/26/05 added quotes: "$newer" below so it would work with filenames
#that have blanks
# echo "starting candidate for newest file is " $newest
# disables itself if newest file has a space in its name
# modify to search by date-modified rather than by -newer fylename TW 10/03
# put the following less the comment character into the crontab
# 42 3 * * * $HOME/public_html/findnewest
# 21Apr2025 OLD find command replaced by subesequent line, removing / after "noshow"
# OLD find . -follow \( -path '*/noshow/' -prune \) -o -name '*\.*htm*' -type f -newer "$newest" -not -name 'newest.html' -not -path '*/\.*' -print -exec ./replaceinnewest \{\} \;
find . -follow \( -path '*/noshow' -prune \) -o -name '*\.*htm*' -type f -newer "$newest" -not -name 'newest.html' -not -path '*/\.*' -print -exec ./replaceinnewest \{\} \;