Bug 252896 - usr.bin/cut when used with -w will replace first delimiter with \t delimter
Summary: usr.bin/cut when used with -w will replace first delimiter with \t delimter
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-21 22:18 UTC by antispam007
Modified: 2021-01-24 17:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description antispam007 2021-01-21 22:18:55 UTC
It seems that cut is replacing Space Char with a Tab Char when you use the special function -w for delimiters

Fast proof could be a 
     ls -al | cut -w -f x- (where x the field number)
you will get someting like
     filed-x <TAB> field-x+1 <SPC> field-x+2 <SPC> ...
instead of 
     filed-x <SPC> field-x+1 <SPC> field-x+2 <SPC> ...

You could verify it with hd(1) where you see 09 for <TAB> and <20> for SPC

Expected behaviour would be, that cut is not touching/changing the field delimiter