10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am new to Expect scripting. I have to connect to a remote server and capture the output. Here I need output of " send "list registered\r"" to be stored in a file. but after execution, /tmp/capture.txt is of 0 byte
#!/usr/bin/expect
spawn ssh abc@10.10.10.10 -p 5022
expect... (2 Replies)
Discussion started by: bns928
2 Replies
2. Shell Programming and Scripting
I know something simple is missing here, "log_user 1" is set . . . after this utility opens ${InFile} (handle? for IntInFile) it needs to look for something to appear in the file ${IntInFile} and then send it to the spawned process. Then I am locking the file ${IntInFile} and clearing it out -... (0 Replies)
Discussion started by: JuanMatteo
0 Replies
3. Shell Programming and Scripting
Hi,
I am using expect to ssh to a remote host and run a program on the remote machine which has a variable runtime. I need to wait until it finishes so I can grab the output file of this program. I am trying to use the output of grep to know when the process finishes. I am trying to capture... (0 Replies)
Discussion started by: vagabond1964
0 Replies
4. Shell Programming and Scripting
match_max 500000
set timeout 30
set outcome1 {}
set outcome2 {}
set inputfile C:\\Users\\Administrator\\Desktop\\inputfile.txt
send -i $con "\r";
expect -i $con "Desktop>" {
exp_send "type $inputfile \r"
}
set timeout 30
expect {
"Desktop>" { set outcome $expect_out(0,string);}... (3 Replies)
Discussion started by: cityprince143
3 Replies
5. Shell Programming and Scripting
(qemu) migrate -d tcp:192.168.122.1:4444
(qemu) info migrate
capabilities: xbzrle: off
Migration status: completed
total time: 4425 milliseconds
downtime: 3 milliseconds
transferred ram: 130338 kbytes
remaining ram: 0 kbytes
total ram: 1057152 kbytes
duplicate: 232613 pages
normal:... (0 Replies)
Discussion started by: yanglei_fage
0 Replies
6. Shell Programming and Scripting
Hi!
I want to start OO in headless mode via expect -
the oo command would be
su - root -c "/usr/lib/openoffice/program/soffice -headless -nofirststartwizard -norestore -nolockcheck -nocrashreport -nodefault -accept='socket,host=0.0.0.0,port=8100;urp;StarOffice.Service'"
and the expect... (2 Replies)
Discussion started by: senior.weber
2 Replies
7. Shell Programming and Scripting
Hi,
I'm trying to come up with a simple expect script that allows me to login to a system and run a single command ... something like this:
#!/usr/bin/expect -f
# let's set some variables
#set password
set ipaddr
set ponumber
set hostname
set timeout -1
# let's now connect to the... (0 Replies)
Discussion started by: danielsf
0 Replies
8. UNIX for Dummies Questions & Answers
hi, everyone:
I just wonder how to save the output of command, I mean everything, save as a string into a variable.
another question is I try to ls the details of a directory, but it works in the shell, not in the script.
for example
code: ls -ltr *se100* | grep ^- | tail -1 | awk '... (1 Reply)
Discussion started by: allenxiao7
1 Replies
9. Shell Programming and Scripting
Hello,
I have a simple expect script I use to ssh to a workstation. I then pass control over to the user with interact.
This script works fine on my HP and Mac, but on my Linux Desktop, I get a problem where the terminal hangs when ever I execute a command in the interact session that requires a... (0 Replies)
Discussion started by: natedog
0 Replies
10. Shell Programming and Scripting
hi
i am having a c code which gives the output of my password in text format
i.e when i run my c code which which gives the password asfollows====>>>>>>
$./passwdprogram ======>>>>>>abc@123(this is the output)
now i have an expect script to remotely ssh which uses the password set in ... (0 Replies)
Discussion started by: xander
0 Replies