[Bug 252896] usr.bin/cut when used with -w will replace first delimiter with \t delimter
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 20 Aug 2021 11:46:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252896 --- Comment #2 from antispam007@mac.com --- The expectation is from the man page "...Consecutive spaces and tabs count as one single field separator" so ther should be no change of the type of white space. If the first of the series of white space is a tab, regardless the other whitespaces should be deleted. The same if the first is a white space is a space. This would also be logical: reduce a series of whitespaces regardless what type to a single one. As there is a different behaviour also in the usage with the field numbers, I am pretty sure that it is a bug. The bug has two sub-bugs: I would not expect the change of the leading white space type ( but that could be a feature that could be described in man) and the second , that it has diffrent behaviour when the number of fields is not given. At least a useful workaround could be to update man: "-w Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator. All consecutive field separator will be replaced with a single tab when used with a known range of fields" -- You are receiving this mail because: You are the assignee for the bug.