RadicalGiant
Technical User
Hi I am new to tcl programming. I am in process of creating a automation tcl and i would like to request for ur help.
Scenario:
I have multiple text files which contains integer data of some variables called nodes and ele.The sample file looks like this.
I have hundreds of those text files.
One similarity in all files is that in line 3 and 4 , we have the element ids and node ids
Now, the thing i would like to automate is that , i want to build a scripts in tcl, after running which, it reads all the node ids and elements ids in lines 3 and 4; only integer values (in all of those 100 txt files) and stores them in a separate txt file, each one for node and for element.
1. Final node txt file should have only node ids from all files
2. Final elem txt file should have only elem ids from all files
It is possible through array? how can we best code it in tcl. pls help. its urgent.
I lack direction. can u help me and guide me , how to create that tcl?
thank you in advance
Scenario:
I have multiple text files which contains integer data of some variables called nodes and ele.The sample file looks like this.
#C
##Id Files
Ele 15235,16845,555845,21452,451254
Nodes 15478,26558,78549,12547,12546,13556
Thickness 2.5
Nodal thickness 0
##Id Files
Ele 15235,16845,555845,21452,451254
Nodes 15478,26558,78549,12547,12546,13556
Thickness 2.5
Nodal thickness 0
I have hundreds of those text files.
One similarity in all files is that in line 3 and 4 , we have the element ids and node ids
Now, the thing i would like to automate is that , i want to build a scripts in tcl, after running which, it reads all the node ids and elements ids in lines 3 and 4; only integer values (in all of those 100 txt files) and stores them in a separate txt file, each one for node and for element.
1. Final node txt file should have only node ids from all files
2. Final elem txt file should have only elem ids from all files
It is possible through array? how can we best code it in tcl. pls help. its urgent.
I lack direction. can u help me and guide me , how to create that tcl?
thank you in advance