I need bash script to upload file with SCP. How I can do that in script, I want to call that script fromother program. ( I know to do that with EXPECT but I need plain bash script). Can anybody help ?

link|improve this question
Please don't cross-post. – Dennis Williamson Feb 21 '11 at 11:12
feedback

1 Answer

#!/bin/bash

scp /path/to/source destination.machine.address:/path/to/destination

Is what you want? I'm not entirely sure what your problem is. Full scp instructions can be accessed with man scp in your terminal. If you're calling it from a script, you will probably want to set up public/private key authentication so you don't need to enter the password (entering the password from the calling program is doable, but a faff).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.