, which means that the fields are single TAB characters and the fields are separated by anything else.
If I change -vFPAT='\t' to -vFS='\t' then I get:
1@3
-vFS='\t' can be shortened to -F'\t' , so it would become:
That's because you are using a regular expression for FS that works differently than you (probably) think it does.
This part:
[^,]*
matches "0 or more occurrences of a character other than comma".
So, let's say I have this as my data:
a,b,c
Then each one of "a", "b" and "c" matches "0 or more occurrences of a character other than comma".
Hence awk considers each one of "a", "b" and "c" as the delimiter and the rest (i.e. commas) as the data tokens.
So it sees this:
data delimiter data delimiter data delimiter data
NULL a , b , c NULL
If you have tabs instead of commas, then the entire string is a "delimiter" and it is sandwiched between two "data" tokens that are both NULL, as seen below: