Reputation: 7327
Hello Trying to sort this list by Month and day. Can not get it staight. Any pointers ?
List example:
Jul 23 Drive :NTFS (Windows 31.6 GB/29.4 GiB) Details : Mounted /dev/sdc1 (Read-Write, label "FreeAgent GoFlex Drive", NTFS 3.1)
Jul 30 Drive :NTFS (Windows 31.6 GB/29.4 GiB) Details : Mounted /dev/sdb1 (Read-Write, label "HP USB FD", NTFS 3.1)
Aug 2 Drive :NTFS (Windows 31.6 GB/29.4 GiB) Details : Mounted /dev/sdb1 (Read-Write, label "WINPART", NTFS 3.1)
Jul 24 Drive :EXT (Linux) Details : EXT3-fs (sdc1)
Jul 25 Drive :EXT (Linux) Details : EXT3-fs (sdb1)
Jul 27 Drive :EXT (Linux) Details : EXT4-fs (sdb2)
Aug 2 Drive :EXT (Linux) Details : EXT3-fs (sdb1)
Aug 2 Drive :EXT (Linux) Details : EXT4-fs (sdb1)
Upvotes: 2
Views: 6284
Reputation: 51
when working on foreign computers we must set the language before sorting this kind of data:
LC_ALL=C sort -k1,1M -k2,2n file.txt
Upvotes: 0