Hello,
Can someone help me...
Need to parse a list to find a "string match", and when matched, return the list index of where it was matched.
Should be easy, and I just need a quick fix.
Thanks
Hello,
Let me explain my situation...
We have two locations, one in South side of Chicago and one in North side. We are running an Avaya Partner Phone system (must be 20 years old). We have a dedicated POTS line connecting both locations that is costing us about $1000/month. The dedicated...
Hi,
I've read in the contents of a directory into a list as follows:
set tempdirContents [ lsort [ glob -nocomplain -types { d } -- * ] ]
What I want to do is sort the list based on the last modify time (so the last modify time is the last entry in the list).
Any ideas on a quick way to do...
I would like to know how to log all output from separate spawned processes to separate files. For example, I am developing a program in which I need to log the execution of "main" and within main, I need to spawn two separate processes that connect to a serial console port for debug info. I...
Can anyone help me determine the cause of the following errors?
I have a script that I use to telnet into several DUTs, execute a "show" command to grab some data, write the data to a single file, the close the spawned telnet process. The script will loop indefinitely; however, the foolowing...
I'm trying to make sense out of the "array get" output:
This is my array:
portHandleArray(0): 1
portHandleArray(1): 2
portHandleArray(2): 3
portHandleArray(3): 4
portHandleArray(4): 11
portHandleArray(5): 12
portHandleArray(6): 13
portHandleArray(7): 14
tclsh>array get portHandleArray
4 11 0 1...
OK, I'm stumped. I have a script that reads a file (of CLI commands)line-by-line and takes each line and appends it to an array/list. Now the list is a bunch of CLI commands. I then loop through each element in the list and send the CLI command to a spawned telnet session to my DUT.
Once I...
OK, I'm stumped. I have a script that reads a file (of CLI commands)line-by-line and takes each line and appends it to an array/list. Now the list is a bunch of CLI commands. I then loop through each element in the list and send the CLI command to a spawned telnet session to my DUT.
Once I...
I can't figure out how to read the contents of a directory that includes other directories and files.
For example, here is what I want to do.
1. cd to a particular directory.
2. read contents of the directories within, and manipulate the dir names so I can "grab" the 3 directories with the...
This should be simple, but I'm having brain freeze.
Basically
set passFailList [ list ]
set test 1
lappend passFailList { $test Pass "" }
puts $passFailList
What I want to see is passFailList = { 1 Pass "" }
however, what I am getting is passFailList = { $test Pass "" }
When I'm appending...
I have a large expect script that installs and initializes software on various networking equipment. Within the script, there are many places where user input and system output is recognized. I would like to be able to create a logfile of the entire session so i can save it. I can't figure...
I am trying to read the contents of a memory map dump of learned unicast entries. Since the memory chunk is 1 million entries, I created an expect script to loop through the retreivals in 10,000 entry chunks. What I want to do is "read" this output into a file for post processing. I'm looking...
when developing and executing between Unix and Linux. I have a script that works perfectly in Unix, and after changing "#!/usr/local/bin/expect" to "#!/usr/bin/expect" the script is not working correctly. Are there major difference between Unix and Linux expect that I'm just not aware of?
The...
I have created an Expect program that spawns various processess and checks a bunch of data; however, I do not want the data output to the stdout (screen) so that the user sees all of this during execution. How can I disable this or get around this so that all a user sees are the the prompts...
I want to match a string regardless of whether it is upper or lower case and I can't figure out how to do this. This seems pretty easy, but yet it crashes at runtime. Here is a snippit of my switch statement:
switch -nocase -- $termserver {
a { set termServerIP "172.23.129.10" }
b { set...
Is there a way to use the split function to split data based on a pattern of chars instead of a single char?
For example, I have exported data from a query and wish to split this data at the words (pattern) "RZDoorsRequirement"
I try: set splitData [ split $data "RZDoorsRequirement" ], but...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.