Skip to content
Advertisement

Tag: tcl

Getting a part of string in tcl

I’m trying to split the following string : Groups/Group#1.rpt to get only the word Group#1.rpt using tcl ; I did the following but the output was empty : Answer This is a job for a specific built-in: file tail! Don’t use string manipulation directly for this; there are some complex nuances on different platforms. This command handles all the tricky

Tcl refuses to set 76800 baud rate for serial channel on Linux

I have an FTDI USB/serial device at /dev/ttyUSB0. I set up my channel with which works just fine for Tcl on Windows. On Linux, baud rate queries show and I get all the garbage you’d expect from trying to communicate at the wrong baud rate. I saw this previous post: fconfigure refuses to set baud rate to 921600 …reference a

Need to automate SSH commands to router

I need to find a way to automate ssh commands to my router. My goal is to make the router restart whenever I run the script from my Java program. I’m having some issues though. First of all, this is the sequence of output I get from my router’s ssh: First I do: which returns: I enter the password, “admin”.

Can’t run same tcl code through tcl script?

I can run the same code by going to tclshfrom my Konsole but when i try to run it using a tcl script, it gives no output. I have a file named name which contains this my name is dev my name is vaibhav When i run the command through tclsh , it gives the required output. Command is exec

Multixterm – “can’t find package Expect”

I am attempting to open multixterm on my desktop machine, but I end up with the error: usr:~> multixterm can’t find package Expect while executing “package require Expect” (file “/usr/local/bin/multixterm” line 6″) Any help would be appreciated. I’ve tried running multixterm on my laptop and on a friend’s machine, and there is no issue there. Both Expect and multixterm exist

Save all data into variable tcl

I have a code which i want to use to open a log file, extract the contents and save it into a variable so i can extract the data from the variable in the future. How do i do that? So far the code saves only the last data of the log file into the variable. I think the while

TCL Expect is injecting an extra null character to stdout

It seems that expect is adding an extra null character or something to stdout. For example: What is this extra character and how do I get rid of it? Answer It’s not a null character. You can use a tool like xxd to see exactly what output expect is producing: This shows that you are getting a standard CR/LF end-of-line

Advertisement