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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to group lines which have same pattern in a list using TCL

Status
Not open for further replies.

tpham1002002

Technical User
Jun 20, 2012
6
US
Hi,

I have a file with content
AXI_STR_RXD_TREADY O undef TRUE true true
AXI_STR_TXC_TDATA O undef TRUE 31 0
AXI_STR_TXC_TKEEP O undef TRUE 3 0
AXI_STR_TXC_TLAST O undef TRUE true true
AXI_STR_TXC_TVALID O undef TRUE true true
AXI_STR_TXD_TDATA O undef TRUE 31 0
AXI_STR_TXD_TDEST O undef TRUE 3 0
AXI_STR_TXD_TKEEP O undef TRUE 3 0
AXI_STR_TXD_TLAST O undef TRUE true true
AXI_STR_TXD_TVALID O undef TRUE true true
S_AXI_ARREADY O undef TRUE true true
S_AXI_AWREADY O undef TRUE true true
S_AXI_BRESP O undef TRUE 1 0
S_AXI_BVALID O undef TRUE true true
S_AXI_RDATA O undef TRUE 31 0
S_AXI_RRESP O undef TRUE 1 0
S_AXI_RVALID O undef TRUE true true
S_AXI_WREADY O undef TRUE true true

I would like to have your help to write a TCL script that can group list of lines that have same pattern , for example AXI_STR_TXC in a list. The script should work for any pattern , for example 2 lines aaa_xxxx_222_bbb , and aaa_xxxx_2222ccc should be grouped
Thank you very much
Have nice day
Tony
 
I'd ask here:
forum287

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top