Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 ?

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

1 Answer 1

#!/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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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