10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
trying to telnet to a device, list the files, and delete them. I can get the script to telnet and log in OK, and even issue the command to list out the files. I can't figure out how to parse the expect_out(buffer) and extract the file name for use in the delete command.
the files list out like... (4 Replies)
Discussion started by: imatinkerer
4 Replies
2. Shell Programming and Scripting
I have a code like this :
set ipv6_acl_max_chars test_acl_max_chars123456a789%s%d2345678ww134rt789qa23456789012345%c89012%a56789012x4r67890test_acl_max_chars1234567890.01234aabcdob34567aBC0
spawn telnet $myip
expect "Login:" { send "admin\r" }
expect "Password:" {send "admin\r" }... (0 Replies)
Discussion started by: ylucki
0 Replies
3. Programming
Can some one tell me how to flush expect_out(buffer)?
below is my code
expect -re {.*} {}
expect "swpackages>*"
send -i $con "trial.bat \r"
set outcome $expect_out(buffer)
expect "*continue*"
set prevreport $expect_out(buffer)
send "\r \r";
problem is :- I am getting "pre" stuffs... (0 Replies)
Discussion started by: cityprince143
0 Replies
4. Shell Programming and Scripting
i have a script inside which i have generated a background job which will run another script.
How do i export the variables from parent script to the child script which wil run in the background .
a.sh:-
export tmpdir="/usr/tmp"
nohup b.sh&
b.sh:-
echo $tmpdir
But... (1 Reply)
Discussion started by: millan
1 Replies
5. Shell Programming and Scripting
Hello "expect" experts
I am new at Expect. I have searched for a little while how to capture multiple lines with Expect and I am almost succeeded on that but I don't get all the lines of a command's output that the script executes on a server.
Here is how my script works in a nutshell -
... (6 Replies)
Discussion started by: capacho6666
6 Replies
6. Shell Programming and Scripting
I have a script which runs a script in the background. Now the script running in background returns some variable value and i want to catch return value in the parent script.
e.g.
Parent Script :
#!/bin/bash
./Back.sh &
pid=$!
echo "a=$a"
echo "b=$b"
echo "d=$((a+b))"
wait $pid
... (4 Replies)
Discussion started by: Shaishav Shah
4 Replies
7. Programming
Greetings,
Having an issue with the expect_out(buffer). in a foreach loop through some switches I am grabbing some arp table information and writing it out to output files (1 each for each switch looped through).
The first iteration works fine. the second iteration of the loop writes the... (0 Replies)
Discussion started by: SuperSix4
0 Replies
8. Shell Programming and Scripting
I have only some info into my buffer, but after a rssi command I see the folowing lines expected into buffer but not present :
rssi=-106
rssi=-109
I see in my buffer only the first part of the output, here you are a part of script :
#!/usr/bin/expect -f
#global expect_out
match_max 10000000... (1 Reply)
Discussion started by: ugobale
1 Replies
9. UNIX for Advanced & Expert Users
Hi guys, I have a issue with a background process, I need to update the value of a variable in that process which is running at this time and it will be running for at least 2 days.
Any idea?
I will apreciate your help. regards.
Razziel. (2 Replies)
Discussion started by: razziel
2 Replies
10. Shell Programming and Scripting
Hi All,
I have a script which calls a child script with a parameter to be run in the background
. childscript.ksh $a &
Can any one suggest me how do i export a variable from the child script to parent script?
Note that the child script is in background
If the child script is in... (3 Replies)
Discussion started by: aixjadoo
3 Replies
SETRBUF(3PVM) PVM Version 3.4 SETRBUF(3PVM)
NAME
pvm_setrbuf - Switches the active receive buffer and saves the previous buffer.
SYNOPSIS
C int oldbuf = pvm_setrbuf( int bufid )
Fortran call pvmfsetrbuf( bufid, oldbuf )
PARAMETERS
bufid Integer specifying the message buffer identifier for the new active receive buffer.
oldbuf Integer returning the message buffer identifier for the previous active receive buffer.
DESCRIPTION
The routine pvm_setrbuf switches the active receive buffer to bufid and saves the previous active receive buffer oldbuf. If bufid is set
to 0 then the present active receive buffer is saved and no active receive buffer exists.
A successful receive automatically creates a new active receive buffer. If a previous receive has not been unpacked and needs to be saved
for later, then the previous bufid can be saved and reset later to the active buffer for unpacking.
The routine is required when managing multiple message buffers. For example switching back and forth between two buffers. One buffer
could be used to send information to a graphical interface while a second buffer could be used send data to other tasks in the application.
EXAMPLES
C:
rbuf1 = pvm_setrbuf( rbuf2 );
Fortran:
CALL PVMFSETRBUF( NEWBUF, OLDBUF )
ERRORS
These error conditions can be returned by pvm_setrbuf
PvmBadParam
giving an invalid bufid.
PvmNoSuchBuf
switching to a non-existent message buffer.
SEE ALSO
pvm_setsbuf(3PVM)
30 August, 1993 SETRBUF(3PVM)