Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a shell script. It will run from machine A, which will SSH into machine B and prompt the user to select a build folder. It'll then copy it to machine A, but I don't know how I can have the user select the folder to be copied?

install_master() {
  ssh -t -t $DEV_UNAME@$DEVSOURCE << EOF

  ?? need the code which would select the folder and scp it 

  scp -r $BUILD_FOLDER $USER@$MASTER_NODE:/var/tmp
share|improve this question

You could just take the folder path from the user input:


A curses file-selector that outputs the selection would be ideal, but I did not find one when I did a quick Google search. Your best bet might be a graphical SCP client like WinSCP or a linux equivalant.

share|improve this answer

Your Answer


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.