Files
2024-10-14 00:08:40 +02:00

31 lines
466 B
Bash

#!/bin/bash
cd /var/www/html/26940_26941
export archfile=archive.html
function ech () {
echo "$1" >> $archfile
}
:>$archfile
ech "<html>"
ech "<body>"
export vals="Temperature PM10 PM25 Humidity hPa"
for J in `echo $vals`
do
ech "<h2>$J</h2>"
for I in `ls *.png | egrep "^graph-$J-[0-9]{4}"`
do
dat=`echo $I | egrep -o "[0-9]{4}-[0-9]{2}-[0-9]{2}"`
ech "<a href='$I' target='_archive'>$dat</a>"
done
done
ech "</body>"
ech "</html>"