Hello kind programmers
I am a newbie and running into an error "line 28: syntax error: unexpected end of file" on the script shown below. Any help would be greatly appreciated. Thanks!
#! /bin/bash
if ($#argv <3) then
echo 'Usage get_modis_snow [yyyy] [mm] [dd] [tile]'
echo 'ftp script for MYD10A2 8-day, 500-m snow'
echo 'example: get_modis_snow 2006 01 01 h08v05'
exit
endif
set yyyy="$1"
set mm="$2"
set dd="$3"
set tile="$4"
target=/desired_folder/
USER="anonymous"
PASS="email_address"
ftp -inv n4ftl01u.ecs.nasa.gov<<ENDFTP
user $USER $PASS
cd /SAN/MOSA/MYD10A2.005/$yyyy.$mm.$dd
put MYD10A2.A$yyyy.$tile.?????????????.hdf>>$target
bye
ENDFTP
exit 0
Thanks in advance!
Cheney