02-15-2013
This is my command's output. It doesn't look like this all the times as the command varies .. Please help me to build the reg expression for the expect command
expect -re "\\\$ " # doesn't capture all lines
$ lname status description
L2cache0 Available L2 Cache
en0 Defined Standard Ethernet Network Interface
en1 Defined Standard Ethernet Network Interface
en2 Defined Standard Ethernet Network Interface
en3 Defined Standard Ethernet Network Interface
en4 Defined Standard Ethernet Network Interface
en5 Defined Standard Ethernet Network Interface
en6 Available Standard Ethernet Network Interface
---------- Post updated at 04:43 PM ---------- Previous update was at 04:36 PM ----------
Thanks DGPicked for your help, but how can I capture the output the log file?
10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Good morning,
The script below without the hilited text successfully FTPs the files in question to the other server when it is called from the crontab. I don't want to establish an FTP connection when there are no files so I tried including the hilited lines to only establish an FTP connection... (6 Replies)
Discussion started by: philplasma
6 Replies
3. Shell Programming and Scripting
I am trying to use send and receive using expect. the expect_out(buffer) is working fine while it is running it as foreground. But the same script when it is ran as background, the expect_out(buffer) errored out.
Is there any factor influence when we run script in foreground and in background? ... (0 Replies)
Discussion started by: shellscripter
0 Replies
4. Shell Programming and Scripting
Hi everyone I'm new here so and I'm just starting to learn a bit of Solaris and I'm working on repairing 10 year old scripts for our system here at work.
When I execute the commands at my prompt everything go's through smooth. I'm using gedit to edit my code because I'm still getting used to the... (4 Replies)
Discussion started by: 82280zx
4 Replies
5. Red Hat
I'm trying to get a RHEL 5.4 base system to authenticate against a W2K8 domain
With the stock samba-3.0.33, I can use wbinfo and getent just fine, but I cannot actually authenticate. Googling finally led to a bug that strongly suggests that 3.0.33 cannot and will never be able to ... (1 Reply)
Discussion started by: jnojr
1 Replies
6. 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
7. 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
8. 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
9. 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
10. Shell Programming and Scripting
I am sorry if i post in wrong Form.
i have AIX server in which ssh works for all users but sftp only works for root user .
it is too much important for me to solve this .
Your help will be greatly appreciated. (1 Reply)
Discussion started by: khalid khanAIB
1 Replies
XI(4) BSD Kernel Interfaces Manual XI(4)
NAME
xi -- Xircom CreditCard Ethernet device driver
SYNOPSIS
xi* at xirc?
Configuration of PHYs may also be necessary. See mii(4).
DESCRIPTION
The xi driver provides support for the Xircom CreditCard family of PCMCIA Ethernet adapters. Supported cards include:
Xircom CreditCard Ethernet II
Xircom CreditCard 10/100 Ethernet
Xircom RealPort 10/100 Ethernet + Modem (Ethernet function only)
Intel EtherExpress Pro/100
Compaq Netelligent 10/100
Cards which should work, but have not been confirmed include:
Xircom RealPort Ethernet
Xircom RealPort 10/100 Ethernet
Some Xircom Ethernet products are supported by the tlp(4) driver.
MEDIA SELECTION
Media selection is done using ifconfig(8) using the standard ifmedia(4) mechanism. Refer to those manual pages for more information.
SEE ALSO
ifmedia(4), mii(4), netintro(4), pcmcia(4), tlp(4), xirc(4), ifconfig(8)
HISTORY
The xi device driver appeared in NetBSD 1.5.
BUGS
The driver suffers from poor performance. Even with the 10/100 cards, do not expect more than ~450KB/s. Some 10/100 cards may not autonego-
tiate reliably and require manual media selection.
The Xircom multifunction cards which contain both Ethernet and modem interfaces are known to have problems. This is due to the card not
reporting itself correctly as a multifunction card.
BSD
June 1, 2007 BSD