sftp to UNIX host

Hi,
I am writing a shell script that securely connects to an UNIX host and transfer file(abc.txt) from the local machine to the host.

sftp user@host
get abc.txt
bye

The code doesn't work..
It throws error at line 2: get :Unknown get command.

How can I rectify this problem?

I am not sure. The get command works for me. Maybe you have a different version of sftp? Type help in sftp and see the available commands for you.

Kishore,

When you say "shell script" I assume you are initiating the connection from a unix/linux box.

scp  /pathto/source  username@destination_ip_or_hostname:/pathtodestination

Also, if you are looking for an automated way of file transfer you may attain it via ssh public/privet key's.