Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Bash Pipes in Expect Script

Status
Not open for further replies.

RidgewayM

Programmer
Jan 22, 2005
9
CA
I've never used expect scripting before and I'm trying to create a small script which has gone well except for this final part.

I have a key stored in the $key variable and I am trying to write this key to a file on the remote machine.

I've tried various puts command and bash scripts but nothing seems to work.

This following command is the closest I've come to success but it seems to do a return command at the pipe symbol (">"):

Code:
send "echo $key > ~/.ssh/authorized_keys\r"

Any tips will be greatly appreciated?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top