ftp "!"

Hi all:
i had seem a shell program that code as below
ftp -i -n 10.11.11.11 << !
cd ..
xxx
xxx
xxx
xx

use ksh
why need added !

thx all. :stuck_out_tongue:

The "!" is part of a heredoc function. Normally in an FTP script, I do something like this:

ftp -vn >> /folder/logfile.log << !
open site
user user password(if needed)
cd /folder/
pwd
mput Files
mget more files
quit
!

This takes the output of all commands between the first ! and the second ! and appends it into the logfile.log. That way, I have a record proving everything went well, or showing me the error if there was a problem.

;