in reply to Re: Replace a Hex Value in Column
in thread Replace a Hex Value in Column

Thanks choroba ! You hit the spot in the sense of performance and simplicity, The speed of XS is just wow never new about that, Sorry for the BitTorrent thing I paste a wrong packet yes indeed it was an SSL.Google and the First part of the Hex 19:68:09:24:00 is just a magic and full hex is always fixed 24 pair,but output should be better below is your code in action:

#!/bin/dash perl -MText::CSV_XS=csv -we 'csv( in => *ARGV, sep_char => ";", always_quote => 1, after_parse => sub { $_[1][-1] = join "", map chr h +ex, split /:/, $_[1][-1] } )'

INPUT

"Feb 2, 2018 18:06:49.993349000 ";"172.16.16.75";"26504";"31.13.86.8" +;"443";"19:68:09:24:00:5b:00:77:53:53:4c:2e:46:61:63:65:62:6f:6f:6b:0 +0:00:00:00" "Feb 2, 2018 18:06:49.993467000 ";"172.16.13.158";"28802";"151.101.11 +2.102";"443";"19:68:09:24:00:5b:00:76:53:53:4c:2e:53:6c:61:63:6b:00:0 +0:00:00:00:00:00" "Feb 2, 2018 18:06:49.996467000 ";"192.167.170.118";"48620";"216.58.2 +10.206";"443";"19:68:09:24:00:bc:00:7c:51:55:49:43:2e:59:6f:75:54:75: +62:65:00:00:00:00" "Feb 2, 2018 18:06:49.997690000 ";"172.16.15.155";"33318";"172.217.18 +.46";"443";"19:68:09:24:00:5b:00:e4:53:53:4c:2e:50:6c:61:79:53:74:6f: +72:65:00:00:00" "Feb 2, 2018 18:06:49.998318000 ";"172.16.23.85";"26617";"31.13.86.51 +";"443";"19:68:09:24:00:5b:00:8e:53:53:4c:2e:57:68:61:74:73:41:70:70: +00:00:00:00" "Feb 2, 2018 18:06:49.998889000 ";"172.16.16.75";"26497";"172.217.18. +42";"443";"19:68:09:24:00:5b:00:ef:53:53:4c:2e:47:6f:6f:67:6c:65:53:6 +5:72:76:69:00" "Feb 2, 2018 18:06:49.999517000 ";"172.16.14.116";"27917";"216.58.209 +.36";"443";"19:68:09:24:00:5b:00:7e:53:53:4c:2e:47:6f:6f:67:6c:65:00: +00:00:00:00:00" "Feb 2, 2018 18:06:50.001838000 ";"172.16.14.163";"26396";"172.217.18 +.42";"443";"19:68:09:24:00:5b:00:ef:53:53:4c:2e:47:6f:6f:67:6c:65:53: +65:72:76:69:00" "Feb 2, 2018 18:06:50.002442000 ";"192.167.175.103";"1169";"107.154.5 +0.239";"21120";"19:68:09:24:00:00:00:00:55:6e:6b:6e:6f:77:6e:00:00:00 +:00:00:00:00:00:00"

OUTPUT

"Feb 2, 2018 18:06:49.993349000 ";"172.16.16.75";"26504";"31.13.86.8" +;"443";"h $"0["0wSSL.Facebook"0"0"0"0" "Feb 2, 2018 18:06:49.993467000 ";"172.16.13.158";"28802";"151.101.11 +2.102";"443";"h $"0["0vSSL.Slack"0"0"0"0"0"0"0" "Feb 2, 2018 18:06:49.996467000 ";"192.167.170.118";"48620";"216.58.2 +10.206";"443";"h $"0�"0|QUIC.YouTube"0"0"0"0" "Feb 2, 2018 18:06:49.997690000 ";"172.16.15.155";"33318";"172.217.18 +.46";"443";"h $"0["0�SSL.PlayStore"0"0"0" "Feb 2, 2018 18:06:49.998318000 ";"172.16.23.85";"26617";"31.13.86.51 +";"443";"h $"0["0SL.WhatsApp"0"0"0"0" "Feb 2, 2018 18:06:49.998889000 ";"172.16.16.75";"26497";"172.217.18. +42";"443";"h $"0["0�SSL.GoogleServi"0" "Feb 2, 2018 18:06:49.999517000 ";"172.16.14.116";"27917";"216.58.209 +.36";"443";"h $"0["0~SSL.Google"0"0"0"0"0"0" "Feb 2, 2018 18:06:50.001838000 ";"172.16.14.163";"26396";"172.217.18 +.42";"443";"h $"0["0�SSL.GoogleServi"0" "Feb 2, 2018 18:06:50.002442000 ";"192.167.175.103";"1169";"107.154.5 +0.239";"21120";"h $"0"0"0"0Unknown"0"0"0"0"0"0"0"0"0"