1829571 Members
3334 Online
109992 Solutions
New Discussion

Re: ftp and end_data_ftp

 
SOLVED
Go to solution
skt_skt
Honored Contributor

ftp and end_data_ftp

HP-UX 11.11

I see one of the script used for automation of ths ftp has the below statement and I dont see any where end_data_ftp is defined.

"ftp -i -n <
I dont see any such details in the man page of ftp with -n option. Any one know better about this variable which goes with "-n"
3 REPLIES 3
Dennis Handly
Acclaimed Contributor
Solution

Re: ftp and end_data_ftp

end_data_ftp is the termination word for this here document. You could just use EOF:
ftp ... <<...
EOF

This is documented under I/O redirection for your shell.

Michal Kapalka (mikap)
Honored Contributor

Re: ftp and end_data_ftp

hi,

check this bolog, i think there are several examples how to do it.

http://www.unix.com/shell-programming-scripting/12034-ftp-script.html

mikap
James R. Ferguson
Acclaimed Contributor

Re: ftp and end_data_ftp

Hi:

A common problem when using "here-documents" in shell scripts is to indent the lines of the document to maintain some consistency with the indentation of the code. That's fine, but beware how you place the end-of-file marker. It must be flush-left on its own line without any leading space characters. Tabs are allowed to precede the end-of-file if the hyphen is added to the redirection like:

cat <<- EOF
this line is indented with spaces
and that's ok.
It's only the end-of-file marker
that must use TAB(S) for its
indentation if that's desired.
EOF

See the 'sh-posix' manpages for more information, as noted.

Regards!

...JRF...