Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: LilTCLer
  • Content: Threads
  • Order by date
  1. LilTCLer

    How to parse a list and return the index of the match?

    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
  2. LilTCLer

    Can Partner System use IP/Internet for Intercom between buildings

    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...
  3. LilTCLer

    Simple way to sort a list?

    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...
  4. LilTCLer

    Logging data from spawned processes

    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...
  5. LilTCLer

    Help diagnose errors: sync byte read: bad file number...

    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...
  6. LilTCLer

    Need to make sense of "array get arr" output response

    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...
  7. LilTCLer

    Can't understand why expect gets "ahead" of itself - send command too

    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...
  8. LilTCLer

    Can't understand why expect gets "ahead" of itself - send command too

    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...
  9. LilTCLer

    How to read and manipulate directories and files?

    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...
  10. LilTCLer

    How to pass a variable value in a list?

    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...
  11. LilTCLer

    Verifying if a proc exists

    Is there any way to verify if a particular procedure exists? If so, how?
  12. LilTCLer

    Whats the best way to LOG an entire script execution?

    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...
  13. LilTCLer

    Expecting multiple lines, the moving output to a file

    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...
  14. LilTCLer

    Whats is the difference between Unix and Linux

    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...
  15. LilTCLer

    How to disable Expect output to stdout?

    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...
  16. LilTCLer

    Switch cmd - matching non-case sensitive

    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...
  17. LilTCLer

    Splitting a string based on a pattern of chars, not a single char

    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...

Part and Inventory Search

Back
Top