>> function choice_1 { >> # deliver the file >> ftp -i ftp.site.com << EOF >> mput $1 $2 $3 $4 >> bye \n >> EOF >> } Try putting the "EOF" to end the rediriction (line 6 in this snip) at the beginning of a line. I don;'t think the "here document" likes the spaces before the EOF mark. =S.Coffin GV Computing scoffin at netcom.com