59 lines
1.2 KiB
Bash
Executable File
59 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
year=$(pwd | cut -c 19- | cut -c -4)
|
|
month=$(pwd | cut -c 24-)
|
|
local_dir=$(pwd)
|
|
gopher_dir=$(pwd | cut -c 12-)
|
|
|
|
if test "$month" = "01"
|
|
then
|
|
wmonth="January"
|
|
elif test "$month" = "02"
|
|
then
|
|
wmonth="February"
|
|
elif test "$month" = "04"
|
|
then
|
|
wmonth="March"
|
|
elif test "$month" = "04"
|
|
then
|
|
wmonth="April"
|
|
elif test "$month" = "05"
|
|
then
|
|
wmonth="May"
|
|
elif test "$month" = "06"
|
|
then
|
|
wmonth="June"
|
|
elif test "$month" = "07"
|
|
then
|
|
wmonth="July"
|
|
elif test "$month" = "08"
|
|
then
|
|
wmonth="August"
|
|
elif test "$month" = "09"
|
|
then
|
|
wmonth="September"
|
|
elif test "$month" = "10"
|
|
then
|
|
wmonth="October"
|
|
elif test "$month" = "11"
|
|
then
|
|
wmonth="November"
|
|
elif test "$month" = "12"
|
|
then
|
|
wmonth="December"
|
|
fi
|
|
|
|
echo "Weather Logs for $wmonth $year"
|
|
echo "----------------------------------"
|
|
echo "Plotted Graphs"
|
|
echo "[1|Temperature|$gopher_dir/temp.dcgi|server|port]"
|
|
echo "[1|Humidity|$gopher_dir/hum.dcgi|server|port]"
|
|
echo "[1|Pressure|$gopher_dir/pres.dcgi|server|port]"
|
|
echo "[1|Dew Point|$gopher_dir/dp.dcgi|server|port]"
|
|
echo "----------------------------------"
|
|
echo "Raw Log Files"
|
|
echo ""
|
|
for file in $local_dir/*txt; do
|
|
echo "[0|$(basename "$file")|$gopher_dir/$(basename "$file")|server|port]"
|
|
done
|