Anstatt nach dem Dateinamen zu suchen, können Sie sich darauf verlassen, dass Ihr HTTP-Server Ihnen mitteilt, wann die Datei zuletzt geändert wurde, und entsprechend handeln.
#!/bin/bash remote_file="http://mywebsite/file.zip" local_file="/storage/file.zip" modified=$(curl --silent --head $remote_file | \ awk '/^Last-Modified/' | \ sed 's/^Last-Modified: //') remote_ctime=$(date --date="$modified" +%s) local_ctime=$(stat -c %z "$local_file") local_ctime=$(date --date="$local_ctime" +%s) [ $local_ctime -lt $remote_ctime ] && /storage/scripts/script.sh # end of file.