[CentOS] Cut command behaviour - bug or feature

Markus Falb markus.falb at fasel.at
Tue Aug 28 20:45:29 UTC 2012


On 28.8.2012 21:59, Rajagopal Swaminathan wrote:
> Greetings,
> 
> I have a CSV file with three fields.
> eg.
> 
> a1,b1,c1
> a2,b2,c2
> ....
> 
> I wanted the output to be:
> b1,c1,a1
> b2,c2,a2
> ....
> 
> the command
> cut -d, -f2,3,1 <file>
> 
> returns
> 
> a1,b1,c1

cut cuts out, that what it does.
I think it works exactly as advertised.
On my system the manpage says

...snip
Selected input is written in the same order that it is
       read, and is written exactly once
snap...

> Is it specific to linux?

No!
-- 
Kind Regards, Markus Falb

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20120828/bb550d8f/attachment.sig>


More information about the CentOS mailing list