I have a big file with a list of testings and there are couple of the testings which are similar. I need some ideas on how i can write a tcl code that will create a new file with the first and last testing of each categories...
I am totally new to tcl, i really dont have any idea on how it works, so any help will be appreciated.
For example i have something like this in ma file currently
Activestatusconnection.5 LED 012356
Activestatusconnection.5 LED 012357
Activestatusconnection.5 LED 012358
Activestatusconnection.5 LED 012359
Activestatusconnection.5 LED 012360
Nonactivestatusconnection LED 60.50.0.0.01
Nonactivestatusconnection LED 60.50.0.0.02
Nonactivestatusconnection LED 60.50.0.0.03
Nonactivestatusconnection LED 60.50.0.0.04
Nonactivestatusconnection LED 60.50.0.0.05
and all i want in the new file is
Activestatusconnection.5 LED 012356
Activestatusconnection.5 LED 012360
Nonactivestatusconnection LED 60.50.0.0.01
Nonactivestatusconnection LED 60.50.0.0.05
Does anybody have any idea on how i can get this.
Can tcl recognize the first and last testing of each categories?
I am totally new to tcl, i really dont have any idea on how it works, so any help will be appreciated.
For example i have something like this in ma file currently
Activestatusconnection.5 LED 012356
Activestatusconnection.5 LED 012357
Activestatusconnection.5 LED 012358
Activestatusconnection.5 LED 012359
Activestatusconnection.5 LED 012360
Nonactivestatusconnection LED 60.50.0.0.01
Nonactivestatusconnection LED 60.50.0.0.02
Nonactivestatusconnection LED 60.50.0.0.03
Nonactivestatusconnection LED 60.50.0.0.04
Nonactivestatusconnection LED 60.50.0.0.05
and all i want in the new file is
Activestatusconnection.5 LED 012356
Activestatusconnection.5 LED 012360
Nonactivestatusconnection LED 60.50.0.0.01
Nonactivestatusconnection LED 60.50.0.0.05
Does anybody have any idea on how i can get this.
Can tcl recognize the first and last testing of each categories?