Sponsored Content
Top Forums Shell Programming and Scripting Need expect to read variables from a list while logged into the same device Post 302526577 by Chubler_XL on Wednesday 1st of June 2011 01:06:30 AM
Old 06-01-2011
For a list try something like this:

Code:
set pvc_list[list 936:21 936:25 936:28 941:22 ]
 
foreach pvc $pvc_list {
    expect "port)#"
    send "dot1q pvc $pvc\r"
    expect "pvc)#"
    send "no bind\r"
    expect "pvc)#"
    send "exit\r"
    expect "port)#"
    send "no dot1q pvc $pvc\r"
}

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Trying to get list of logged on users sorted

I'm trying to execute a single shell command that will give me a sorted list of all the users currently logged into the system, displaying the users name as it appears in /etc/passwd. I've tried awk -F: '{print $1}' /etc/passwd | xargs finger -s | cut -c11-28 | uniq This list whoever does... (7 Replies)
Discussion started by: kungfuice
7 Replies

2. UNIX for Dummies Questions & Answers

List all inactive users who has not logged on since last 90 days

Hi, Can I get a script to list out all the users, who has not logged on since last 90 days. Last command in not working due due to /var/adm/wtmpx is more than 2 GB. Thanks in advance. Regards, Roni (10 Replies)
Discussion started by: manasranjanpand
10 Replies

3. Solaris

List all inactive users who has not logged on since last 90 days

I need actuall script which List all inactive users who has not logged on since last 90 days Thanks in advance. Di! (17 Replies)
Discussion started by: haridham
17 Replies

4. Programming

Get the list of logged in users

How can I get the list of logged in users in the system programmatically? I can get the list with 'who' or 'users' commands but I need to get the list programmatically... May someone help, please? Thanks in advance. (2 Replies)
Discussion started by: xyzt
2 Replies

5. Shell Programming and Scripting

List all log records logged after $timestamp ?

I am trying to find a way to list every records inside a file (usually a log file) that are present after a record mathing/greater-then a timestamp supplied by another script. The timestamp can be anywhere inside the record and it is usually in the standard `date` format (will not look for other... (5 Replies)
Discussion started by: Browser_ice
5 Replies

6. Shell Programming and Scripting

Problems with expect and set variables

I'm writing a script that'll send a time-stamp to my backup server. I create a file with the name of the current date, send it to my server with scp and rm the file from the local computer. Individually these commands work fine and with a set name the expect scripts also work fine. The problem... (0 Replies)
Discussion started by: Ktesh564
0 Replies

7. Shell Programming and Scripting

Expect and variables

I'm trying to make an expect function that will pass through a variable. /usr/bin/expect<<EOD spawn su - expect "Password: " send "$psswd\r" expect "#" send "/etc/init.d/network restart >>$log\r" expect "#" send "exit\r" EOD The $log passes through but my $psswd fails I know... (1 Reply)
Discussion started by: Lotheovian
1 Replies

8. Shell Programming and Scripting

How to show a list of currently logged in and logging out users?

Hi Guys! I am sure that this question might appeared previously, but I still don't know how to show a list of logged out users. Please help with this! Thanks in advance:) (5 Replies)
Discussion started by: saloliubliu
5 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Unable to read threads when logged in

I'm getting the following error (or something similar) whenever I try to view a thread when I'm logged in. That is, I login, hit "New Posts", get a list of theads, click on one (in this example is was the "Not allowed to post URLs" thread), then get the following HTML error page instead of the... (1 Reply)
Discussion started by: cnamejj
1 Replies

10. Shell Programming and Scripting

Expect - bash and variables

I was wondering if anyone could provide some assistance. I trying to run an expect script within bash and get the results of a variable called RESULT. I Have tried a few things but none of them have worked. I know that the child process (the expect script) in this instance cannot set a variable... (6 Replies)
Discussion started by: ylafont
6 Replies
MRTG-MIBHELP(1) 						       mrtg							   MRTG-MIBHELP(1)

NAME
mrtg-mibhelp - A Table of some interesting OIDs OVERVIEW
This File Contains a collection of interesting MIB Entries ... mrtg knows about their names ... depending on the ASN.1 Syntax you may have to put gauge into the Options[]: parameter. For information about how to create a Target[]: parameter which references these MIB entries, please consult mrtg-reference. MIB LIST
ifOperStatus Descriptor: ifOperStatus Identifier: 1.3.6.1.2.1.2.2.1.8 ASN.1 Syntax: INTEGER Enumeration: up 1, down 2, testing 3 The current operational state of the interface. The testing(3) state indicates that no operational packets can be passed. ifAdminStatus Descriptor: ifAdminStatus Identifier: 1.3.6.1.2.1.2.2.1.7 ASN.1 Syntax: INTEGER Enumeration: up 1, down 2, testing 3 The current administrative state of the interface. The testing(3) state indicates that no operational packets can be passed. ifInOctets Descriptor: ifInOctets Identifier: 1.3.6.1.2.1.2.2.1.10 ASN.1 Syntax: Counter32 The total number of octets received on the interface, including framing characters. ifInUcastPkts Descriptor: ifInUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.11 ASN.1 Syntax: Counter32 The number of subnetwork-unicast packets delivered to a higher-layer protocol. ifInNUcastPkts Descriptor: ifInNUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.12 ASN.1 Syntax: Counter32 The number of non-unicast (i.e., subnetwork- broadcast or subnetwork-multicast) packets delivered to a higher-layer protocol. ifInDiscards Descriptor: ifInDiscards Identifier: 1.3.6.1.2.1.2.2.1.13 ASN.1 Syntax: Counter32 The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. ifInErrors Descriptor: ifInErrors Identifier: 1.3.6.1.2.1.2.2.1.14 ASN.1 Syntax: Counter32 The number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. ifInUnknownProtos Descriptor: ifInUnknownProtos Identifier: 1.3.6.1.2.1.2.2.1.15 ASN.1 Syntax: Counter32 The number of packets received via the interface which were discarded because of an unknown or unsupported protocol. ifOutOctets Descriptor: ifOutOctets Identifier: 1.3.6.1.2.1.2.2.1.16 ASN.1 Syntax: Counter32 The total number of octets transmitted out of the interface, including framing characters. ifOutUcastPkts Descriptor: ifOutUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.17 ASN.1 Syntax: Counter32 The total number of packets that higher-level protocols requested be transmitted to a subnetwork-unicast address, including those that were discarded or not sent. ifOutNUcastPkts Descriptor: ifOutNUcastPkts Identifier: 1.3.6.1.2.1.2.2.1.18 ASN.1 Syntax: Counter32 The total number of packets that higher-level protocols requested be transmitted to a non- unicast (i.e., a subnetwork-broadcast or subnet- work-multicast) address, including those that were discarded or not sent. ifOutDiscards Descriptor: ifOutDiscards Identifier: 1.3.6.1.2.1.2.2.1.19 ASN.1 Syntax: Counter32 The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being transmit- ted. One possible reason for discarding such a packet could be to free up buffer space. ifOutErrors Descriptor: ifOutErrors Identifier: 1.3.6.1.2.1.2.2.1.20 ASN.1 Syntax: Counter32 The number of outbound packets that could not be transmitted because of errors. ifOutQLen Descriptor: ifOutQLen Identifier: 1.3.6.1.2.1.2.2.1.21 ASN.1 Syntax: Unsigned32 The length of the output packet queue (in packets). frInOctets From: Simon Ferrett <simonf@world.net> 'frInOctets' => '1.3.6.1.2.1.10.32.2.1.9' 'frOutOctets' => '1.3.6.1.2.1.10.32.2.1.7' which when used in the form: frInOctets.pp.dd&frOutOctets.pp.dd:community@cisco.router where pp is the physical port that the frame relay pvc is defined on and dd is the DLCI of the pvc gets you the in and out octets for just that pvc. ifAdminHack and ifOperHack The return values of ifAdminStatus and ifOperStatus are not very usefull for graphing. Use ifOperHack and ifAdminHack instead. They return 1 for UP and 0 otherwise. Note these are not real MIB entities but mrtg hacks PseudoZero and PseudoOne will return 0 and 1 respectively Note these are not real MIB entities but mrtg hacks AUTHOR
Tobias Oetiker <tobi@oetiker.ch> 2.16.2 2008-05-16 MRTG-MIBHELP(1)
All times are GMT -4. The time now is 11:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy