10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi
I am writing a TCL script to delete a certain in a file
My Input file
module bist_logic_inst(a, ab , dhd, dhdh , djdj, hdh, djjd, jdj, dhd, dhp, dk
);
input a;
input ab;
input dhd;
input djdj;
input dhd;
output hdh;
output djjd;
output jdj;
output dk; (1 Reply)
Discussion started by: kshitij
1 Replies
2. Shell Programming and Scripting
In a tcl script I need to find a way of reading a file, and looking for a phrase ("set myvariable") and putting the word following that into a variable.
I've used a file open, and a while loop with gets to read each line from the file into a variable, and using regexp searched for the item. I'm... (1 Reply)
Discussion started by: Tonyb61
1 Replies
3. Shell Programming and Scripting
I need to change R3.1.5 as 03015
similarly R4.1.7 as 04017
i need a single command
in tcl pls help
---------- Post updated at 05:19 PM ---------- Previous update was at 04:48 PM ----------
i had to do like this without using regexp
set old_release "R3.1.5"
... (1 Reply)
Discussion started by: Syed Imran
1 Replies
4. Shell Programming and Scripting
Hello everyone,
What is the difference between these two tcl commands:
(A) --> puts "ERROR!!! ${current_name}/${opt} is not found."
(B) --> puts "ERROR!!! $current_name/$opt is not found."
Are the braces needed to be put? Or both A and B has the same output? (5 Replies)
Discussion started by: mar85
5 Replies
5. Shell Programming and Scripting
Hello everyone,
I'm new in tcl scripting.
I'm currently studying a tcl script and came across this line:
regexp {(\d+)(\S?)} $opts match opt swi
According to my understanding, this line means to search in the opts variable for one or more digit, followed by a non-whitespace character... (2 Replies)
Discussion started by: mar85
2 Replies
6. Programming
Hello guys, please help me
I want to use TCl to move the lines with line number as odd number to a new file source_odd.txt, and move the lines with character 'a' to another file source_a.txt.
I also want to create a tcl function to list all the file names in a appointed directory. (1 Reply)
Discussion started by: kunleoyafajo
1 Replies
7. UNIX for Dummies Questions & Answers
Good Day,
Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp.
sed -n '/regexp/{n;p;}' filename
What if my regexp is 3 word or a sentence. Im... (3 Replies)
Discussion started by: ownins
3 Replies
8. Shell Programming and Scripting
Hello Experts,
Can someone help me here:
I have a variable which contains a string with "".
set var1 {a}
set str1 {a is the element i want to match}
Now "regexp $var1 $str1" does not work?
("regexp {a\} $str1" works, but var1 gets it's value automatically from another script)
Is... (6 Replies)
Discussion started by: sumitgarg
6 Replies
9. Shell Programming and Scripting
Hi guys,
does anyone know how to test for a regular expression - i want to include it in a script to make sure the variable is a regexp
cheers (3 Replies)
Discussion started by: penfold
3 Replies
10. Shell Programming and Scripting
Hello
I am a TCL beginer, so please answer accordingly
here are my question:
1. variable scope
I built a text widget and gave it a textvariable: cmd_entry, I
I sent it to a procedure where I declare it as “global cmd_entry” and give it a value
The problem is that in the main program... (0 Replies)
Discussion started by: orid
0 Replies