bug-textutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cut-bug?


From: Bob Proulx
Subject: Re: cut-bug?
Date: Fri, 16 Nov 2001 23:07:39 -0700

> Is it a bug or a feature?
> 
> $ echo "1234567890" | cut -c 8-,-4
> 1234890
>
> What I want is:
> 
> $ echo "1234567890" | cut -c 8-,-4
> 8901234
> 
> What I really like is:
> 
> $ echo "1234567890" | cut -c 5-,-5
> 56789012345

The cut command does not rearrange input columns on output.  It is
always in strictly ascending order.  However you get to pick and
choose your columns any you want to express it.  Therefore the last
example in particular would be a noop since it selects all columns by
denoting all columns by that overlapping specification.  In addition
to the online info documentation see the online standards docs.

  http://www.opengroup.org/onlinepubs/007908799/xcu/cut.html

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]