Sponsored Content
Top Forums Shell Programming and Scripting Expect_out(buffer) works but it doesn't get all lines Post 302770421 by capacho6666 on Friday 15th of February 2013 04:43:45 PM
Old 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

expect_out(buffer) empty

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

Script works but doesn't with cron

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

expect_out buffer no such variable running script background

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

Script works but doesn't?

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

Samba 3.0.33 (sorta) works, 3.5.4 doesn't

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

[SOLVED] Flushing expect_out(buffer) inside a loop

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

Flushing expect_out(buffer)

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

Jumbled output in expect_out(buffer)

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 parse expect_out(buffer)

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

SSh works but sftp doesn't for all users except root

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
os_mibs(8)						      System Manager's Manual							os_mibs(8)

NAME
os_mibs - Tru64 UNIX extensible SNMP subagent daemon SYNOPSIS
/usr/sbin/os_mibs DESCRIPTION
The os_mibs daemon is a subagent that implements the standard MIB support for Tru64 UNIX. It currently supports MIB II, the FDDI MIB, the Token Ring MIB, Host Resources MIB, and the Ethernet-like Interfaces MIB. This daemon is started and stopped automatically and in conjunction with the SNMP master agent snmpd; no configuration or user action is required. Unexpected conditions when servicing requests for these MIBs are logged using the syslog function. For Host Resources MIB information, see Network Administration. For information about building subagents and extensible SNMP support, see the Network Programmer's Guide. FILES
The system daemon log file. Where (date is the date). SEE ALSO
Commands: snmpd(8), snmp_request(8) Functions: syslog(3) RFC 1213, MIB II RFC 1231, IEE 802.5 Token Ring MIB RFC 1285, FDDI MIB RFC 1514, Host Resources MIB RFC 2011, SNMPv2 MIB for the Internet Protocol using SMIv2 RFC 2012, SNMPv2 MIB for the Transmission Control Protocol using SMIv2 RFC 2013, SNMPv2 MIB for the User Datagram Protocol using SMIv2 RFC 2358, Definitions of Managed Objects for the Ethernet-like Interface Types os_mibs(8)
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy