On 06/10/2010 10:58 AM, Peng Yu wrote:
> 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.
Correct. POSIX standardized this behavior because some scripts rely on
it, even though it may not be the most intuitive.
>
> 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.
No. Use awk instead.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc Description: OpenPGP digital signature