Thanks for sharing!
I’m not sure if you are saying you intentionally put a bug in the code to force us to look at it or if you are asking for us to help you find the bug.
It would also be nice to describe what to expect the script to do.
I got a fair idea of what to expect when I took a quick look at the code.
I ran the code and got an error and took a look and immediately saw a significant amount of necessary code was comment out on the following line:
set fd [open “$HciSiteDir/NetConfig” r]; #fconfigure $fd -translation binary; set data [read $fd]; regsub -all — “n” $data “” data; regsub -all — “protocol ” $data “nprotocol ” data; regsub -all — “process ” $data “nprocess ” data; set data [lrange [split $data n] 1 end]; close $fd
since you are looking for comments, as a matter of preference I chose to change your one line of code into the following:
set fd [open “$HciSiteDir/NetConfig” r];
fconfigure $fd -translation binary;
set data [read $fd];
regsub -all — “n” $data “” data;
regsub -all — “protocol ” $data “nprotocol ” data;
regsub -all — “process ” $data “nprocess ” data; set data [lrange [split $data n] 1 end];
close $fd
You will notice I also took out the # in front of fconfigure and it produce output like this for the site I was in when I ran it:
Thread Name Host Name Port/Type Comments
———– ——— ——— ——–
9208 9208 PDL: mlp_tcp.pdl
9411_pat1_ordrs pat1_lis_jump_2_lis/tcpip Encode Type: binary
jump_picis_9216 localhost 9216 PDL: mlp_tcp.pdl
9207 9207 PDL: mlp_tcp.pdl
jump_pat1_9404 lis_jump_pat1_lab/tcpip Encode Type: binary
ib_pathnet_351_8027 8027 PDL: mlp_tcp.pdl
9212 9212 PDL: mlp_tcp.pdl
ob_pathnet_351_8026 hnaa 8026 PDL: mlp_tcp.pdl
load_pathnet_351 file In: /data/test_cerner/load_pathnet_351, Out: /dev/null
9211 9211 PDL: mlp_tcp.pdl
jump_mercurymd_9502 localhost 9502 PDL: mlp_tcp.pdl
9210 9210 PDL: mlp_tcp.pdl
9030_sms_23_adt 9030 PDL: mlp_tcp.pdl
ib_pathnet_rslts_9417 ib_lis_rslts PDL: mlp_tcp.pdl
9206_flat_adt 9206 PDL: mlp_tcp.pdl
jump_bdm_rxtfc_9029 127.0.0.1 9029 PDL: mlp_tcp.pdl
ob_pathnet_ord_subset_file file In: /dev/null, Out: ../../../data/fls/test_fls
ob_pathnet_ordrs_9416 hnaa ob_lis_ordrs PDL: mlp_tcp.pdl
ob_labdb_5581 CL_lisods 5581 PDL: mlp_tcp.pdl
ob_labdb_5580 CL_lisods CL_ob_lis_rslts_ods PDL: mlp_tcp.pdl
hop_9208 localhost 9208 PDL: mlp_tcp.pdl
ob_ocf_8013 8013/tcpip Encode Type: binary
hop_9207 localhost 9207 PDL: mlp_tcp.pdl
load_pathnet_450 file In: /data/test_cerner/load_pathnet_450, Out: /dev/null
ob_rslts_clin_stat 143.111.217.93 12561 PDL: mlp_tcp.pdl
hop_9212 localhost 9212 PDL: mlp_tcp.pdl
js_bldbnk localhost qdx_test_j_lab_450 PDL: mlp_tcp.pdl
ob_pathnet_450_8062 hnaa 8062 PDL: mlp_tcp.pdl
hop_9211 localhost 9211 PDL: mlp_tcp.pdl
hop_9210 localhost 9210 PDL: mlp_tcp.pdl
ib_pathnet_450_8021 8021 PDL: mlp_tcp.pdl
Russ Ross
RussRoss318@gmail.com