I am dealing with a file where fields are separated by a single space.
awk interprets the FS " "
as "one or more whitespace", which misreads my file when one of the fields is empty.
I tried using "a space not followed by a space"( " (?! )"
) as FS but awk does not support negative lookahead. Simple google queries like "single space field separator awk" only sent me to the manual page explaining the special treatment of FS=" "
. I must have missed the relevant manual page...
How can I use a single space as field separator with awk?