Search Results

Search: Posts Made By: eric4
6,047
Posted By eric4
I think I figured it out: awk ' BEGIN...
I think I figured it out:

awk '
BEGIN {FS=";"}
/;src;/{
for (num=1;num<=NF;num++) {if ($num == "src") fieldsrc=num};
for (num=1;num<=NF;num++) {if ($num == "dst") fielddst=num};
for...
6,047
Posted By eric4
AWK - printing certain fields when field order changes in data file
I'm hoping someone can help me on this. I have a data file that greatly simplified might look like this:

sec;src;dst;proto
421;10.10.10.1;10.10.10.2;tcp
426;10.10.10.3;10.10.10.4;udp...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy