Quote:
Originally Posted by
msandeep27
as far i know scp is just a command that is run is unix directly
They're all just commands.
Some, like text editors, will sensibly demand a terminal to work of course, but it's not a different "kind" of command.
Quote:
if we can use it in the script can you please tell the me the full script
There's no direct translation that I can see. I can't even tell what the filenames are supposed to be in that thing. I've given you complete examples of copying from remote-to-host and host-to-remote, clearly labelled, for you to modify to your own needs. What more can I do?
scp on its own will demand a password. If this is unacceptable, you can set up keys in advance to let the process happen without interaction. Google 'passwordless ssh' to find out all about how.