cut 2.0a

Hacksaw <[email protected]>
Newsgroups gmane.comp.gnu.textutils.bugs
Organization First Church of Eris
Message-ID <[email protected]>
I run 'wc' on a file, .alias, containing 14 lines. It prints:
     14 /home/hacksaw/.alias

'wc -l ~/.alias | cut -f1' produces the same thing. This is non-intuitive.

'wc -l ~/.alias | cut -f1 -d" "' produces a blank line

'wc -l ~/.alias | cut -f1 -d"     "' produces
cut: the delimiter must be a single character

So cut is not a solution to print specific fields of input lines unless the delimiter is exactly one character. 

How often do the GNU utilities actually use tabs for that purpose? Obviously 'wc' doesn't.

-- 
http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD
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.