Search Results

Search: Posts Made By: jlim
23,711
Posted By jlim
Thanks for the suggestion. I tried it again and...
Thanks for the suggestion. I tried it again and it works (exits). I executed it previously using ./myscript.exp but I tried it again and it worked as well. I'm not entirely sure what happened before....
23,711
Posted By jlim
Sorry, I'm not understanding it. The...
Sorry, I'm not understanding it.



The advice was to either send "exit" OR directly spawn ssh and the advice was to take the second route. So, I'm using spawn instead, but I'm still not getting...
23,711
Posted By jlim
The main part of the script (ssh, logout, scp...
The main part of the script (ssh, logout, scp etc.) came from using autoexpect. The actual operations after ssh etc. are what I wrote.

I believe \r is correct from what I have read. Also...
23,711
Posted By jlim
I tried the following: #!/usr/bin/expect...
I tried the following:


#!/usr/bin/expect -f

set timeout -1

##
## START OF SCRIPT
##

### SSH to remote server
spawn ssh root@myserver
expect "*?assword:*"
... (code removed) ...
...
23,711
Posted By jlim
How do I end the shell? Send the ^D char? I...
How do I end the shell? Send the ^D char? I recall trying this but when testing from the term, I still do not get control back after the script ends.

Can you provide an example of how to properly...
23,711
Posted By jlim
Perhaps I wasn't clear in my original post. The...
Perhaps I wasn't clear in my original post. The script is working, but I'm not sure how to properly exit from Expect when invoking manually from a term vs calling it from a cron job.

Here's a...
23,711
Posted By jlim
How to end Expect script?
Hi,
I'm not sure how to properly end an Expect script that will eventually be called by a cronjob. Right now, I'm running it from the command line. The gist of it:

spawn $env(SHELL)

### SSH...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 09:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy