grep -EHr "192\.168\.1\.123" |
cut -d':' -f2- |
awk -F '"' 'BEGIN{
OFS=",";
print "name","action","srcip","srcport","dstip","dstport","protocol","tcpflags"
}
{
print $10,$12,$22,$36,$24,$38,$26,$(NF-1)
}'
Adding -x to column makes no difference either, nor does specifying the number of columns with -c (I have plenty of screen width in the terminal). Why is it doing that when there is no newline in the original data?
I really don’t think it is a character in my data because it is also happening with the header column which I created in my awk BEGIN block.