Re: Specifying multiple separators via FS or the -F command line flag - addendum

cga2000 <[email protected]>
Newsgroups gmane.comp.gnu.utils
Message-ID <[email protected]>
Here's a sample of how the multiple separators feature behaves:

[15:52:17][gavron@turki:~]$ echo " one: two:three :four five" | awk -F "[: ]" '{print "1 "$1; print "2 "$2; print "3 "$3; print "4 "$4; print "5 "$5; print "6 "$6;print "7 "$7;print "8 "$8}'
1
2 one
3
4 two
5 three
6
7 four
8 five

Doesn't seem very logical to me.  

When awk successfully tests for space or colon, the following characters
are assumed NOT to be separators even if they have been defined as such
via the -F flag -- eg. the <space> that follows "one:" is mapped to the
$3 variable.

Is this the way it's supposed to work?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.