[lug] question about ftp script...

arnie asherman1 at uswest.net
Mon Dec 13 18:57:19 MST 1999


Thanks, that did it, I assume that white space is all just white space
in shell, perl, and c. I guess I need to read up on the 'here'
documents. They didn't teach us this stuff in my Fine Arts degree...

One more problem... the positional parameters $1 through $4 seem to only
be local to the script, and not global. I can echo the values outside of
the function, but they echo as null from within the function. If I hard
code the file names, then the mput works, but using $1 - $4 no put
happens (well, actually I think it might put a null filename) How do I
pass the parameters into the function, or at least make
them global? Along the same line, does calling the function actually
start a child shell?
thanks,

--
arnie sherman
frenomulax at bigfoot.com

"Paradise is exactly like where you are right now,
 only much, much better."
        -Laurie Anderson





Stephen Coffin wrote:

> >> 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
>






More information about the LUG mailing list