[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6394: Is it possible to reorder fields with cut?
From: |
Peng Yu |
Subject: |
bug#6394: Is it possible to reorder fields with cut? |
Date: |
Thu, 10 Jun 2010 11:58:00 -0500 |
Hi,
I need to reorder the fields in a file. But the -f option can not be
used to reorder field 1 and field 2.
Basically, I want the original 1st field as the new 2nd field and the
original 2nd field the first. Is reordering fields possible with cut.
$ cat input.txt
a b c
e f g
$ cut -f 1,2 input.txt
a b
e f
$ cut -f 2,1 input.txt
a b
e f
--
Regards,
Peng
- bug#6394: Is it possible to reorder fields with cut?,
Peng Yu <=