On Tue, Nov 26, 2013 at 11:40:01AM +0200, alex bodnaru wrote: > Package: gawk > Version: 1:4.0.1+dfsg-2.1 > Severity: normal > > Dear Maintainer,
Dear Alex, > thank you for maintaining this package. > > wishing to make a filter in the bluefish editor, i turned to awk. > i needed to perform a matchall equivalent, so split/patsplit were chosen. > the gawk man says "patsplit(s, a [, r [, seps] ])" the sepatator matches > would be in the last param, as with split. > in reality, for patsplit they were switched, as opposed to split, > where they matched the man. > i don't know which of them: the man or the program is to be fixed. first of all apologies for the late reply. Perhaps I am missing something, but it seems to work for me: $ echo 'foo,bar.baz' | awk '{n = patsplit($0,a,/[^,|.]*/,b); for(i=1;i<=n;i++) print a[i] " " b[i]}' foo , bar . baz $ > thanks again, > alex cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed