UNIX FTP script help

How do we write a simple FTP script where we write all the commands like open, user, pwd, get, etc written to a command file and then executing the command file with FTP utility? Thank you.

Kumar

Did you search the forum? there are really a lot of threads about ftp scripting
like
e.g.

They go in a file named .netrc in your current directory. You still need to specify the host on the command line.

AP Tempe FTP notes using a Linux system
We are just using a .netrc file to connect to the server and a put command to place the files there.

ftp xxx.xx.x.xx
Connected to xxx.xx.x.xx (xxx.xx.x.xx).
220 FTP Server ready.
331 Password required for aptempe.
230 User aptempe logged in.
Remote system type is UNIX.
ftp> ls
227 Entering Passive Mode (xxx,xx,x,xx,215,131)
ftp: connect: Connection timed out

And here's where it hangs....