[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cut command - Issue for getting fields
From: |
Eric Blake |
Subject: |
Re: Cut command - Issue for getting fields |
Date: |
Thu, 06 Sep 2007 06:15:21 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Omesh_Vashisth/CHE/HSS on 9/5/2007 11:56 PM:
>
> cut -f12,3 -d, filename = ; and cut
> -f3,12 -d, filename
>
> Both the commands yeild to same result with rows conatining fields 3
> and 12 in the same sequence of 3,12.
Not a bug. Cut is required, by POSIX, to list fields in numerical order,
or, according to 'cut --help': "Selected input is written in the same
order that it is read, and is written exactly once." If you want to
rearrange field order, you should use something else, like awk.
> "DISCLAIMER: This message is proprietary...
Please refrain from using email accounts that attach disclaimers when
posting to public lists. The very nature of a public lists makes the
disclaimer unenforceable, and there are several people who will refuse to
respond to mail with such disclaimers.
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFG3+9Z84KuGfSFAYARAlfTAJ97lYoiiPhz8P/y2FIu14wLVuiYswCgjcbo
WiScB8qlGddnwhkK+2j4QnM=
=Vdwd
-----END PGP SIGNATURE-----