Can someone explain why the end of the file is unexpected on line 49? (Line 49 is one line after the last line)
#!/bin/bash
timeend=$(date -u +%H%M)
timestart=$(date --date "$timeend 30 minutes ago" -u +%H%M)
firsttime=0
while true
do
if [[ $firsttime -eq 0 ]]; then
time=$timestart
increment=0
fi
if [[ $firsttime -ne true ]]; then
increment=$(( $increment + 2 ))
time=$(( $timestart + $increment ))
fi
if [[ $time -ge $timeend ]]; then
break
fi
gpnids << EOF
RADFIL = NEXRIII|CLT|TR0
RADTIM = "$time"
TITLE = 1/-2
PANEL = 0
DEVICE = gif|radar"$increment".gif|1280;1024|C
CLEAR = Y
TEXT = 1/2/2/hw
COLORS = 7
WIND =
LINE =
CLRBAR =
IMCBAR = 5/v/LL/.005;.6/.4;.01
GAREA = dset
MAP = 24 + 23 + 1/1/2 + 14 + 15/1/2
LATLON = 0
OUTPUT = t
$mapfil = lorvus.usg + hicnus.nws + hipona.nws + louhus.nws + loisus.nws
run
exit
EOF
firsttime=1
gpend
done
SO
andLinux
).