Re: awk: FS matching 0 or more characters

2020-02-03 Thread Stephane Chazelas
2020-02-03 15:10:29 -0800, Don Cragun: [...] > "The search for a matching sequence starts at the beginning > of a string and stops when the first sequence matching the > * ``begins earliest in the string’’. If the pattern permits > * a variable number of matching characters and

Re: awk: FS matching 0 or more characters

2020-02-03 Thread Don Cragun
Hi Martijn, In the description of REs in the standard, "match" is described (on P181-182, L5969-5993 in the 2017 edition of the standar) as: "A sequence of zero or more characters shall be said to be matched by a BRE or ERE when the characters in the sequence correspond to a

awk: FS matching 0 or more characters

2020-02-03 Thread Martijn Dekker
Consider: echo 'one!two!!three!!!end' | awk -v 'FS=!*' \ '{ for (i=NF; i>0; i--) print $i; }' Onetrueawk, mawk, GNU awk, and Solaris awk all print: end three two one However, Busybox awk prints: d n e e e r h t o w t e n o In a way, the Busybox awk behaviour makes mor