problem wth sort utility?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm getting results that I don't expect and different from busybox 
sort?

The file contains partition infomation
[======DISK======] [=============NAME==============] 
[====SIZE====] [MAJ] [MIN]
[sda             ] [Hitachi HDP72505               ] [   465.76 GB] [  8] [  
0]

[=====DEVICE=====] [==FILESYS==] [======LABEL======] 
[====SIZE====] [MAJ] [MIN] 
[sda1            ] [ext3       ] [<unknown>        ] [   200.00 MB] [  8] [  
1] 
[sda2            ] [LVM2_member] [<unknown>        ] [    31.18 GB] [  
8] [  2] 
[sda3            ] [ext3       ] [<unknown>        ] [   434.38 GB] [  8] [  3] 
[dm-0            ] [ext4       ] [<unknown>        ] [    25.87 GB] [253] [  
0] 
[dm-1            ] [swap       ] [<unknown>        ] [     5.31 GB] [253] [  
1] 

When I use the Fedora 14 sort I get this.

[=====DEVICE=====] [==FILESYS==] [======LABEL======] 
[====SIZE====] [MAJ] [MIN] 
[======DISK======] [=============NAME==============] 
[====SIZE====] [MAJ] [MIN]
[dm-0            ] [ext4       ] [<unknown>        ] [    25.87 GB] [253] [  
0] 
[dm-1            ] [swap       ] [<unknown>        ] [     5.31 GB] [253] [  
1] 
[sda1            ] [ext3       ] [<unknown>        ] [   200.00 MB] [  8] [  
1] 
[sda2            ] [LVM2_member] [<unknown>        ] [    31.18 GB] [  
8] [  2] 
[sda3            ] [ext3       ] [<unknown>        ] [   434.38 GB] [  8] [  3] 
[sda             ] [Hitachi HDP72505               ] [   465.76 GB] [  8] [  
0]

Which is not what I expect with sda coming at the end instead of 
before sda1, and there are just spaces between all the charcters, 
no special codes.

Using busybox sort results in this.

[======DISK======] [=============NAME==============] 
[====SIZE====] [MAJ] [MIN]
[=====DEVICE=====] [==FILESYS==] [======LABEL======] 
[====SIZE====] [MAJ] [MIN] 
[dm-0            ] [ext4       ] [<unknown>        ] [    25.87 GB] [253] [  
0] 
[dm-1            ] [swap       ] [<unknown>        ] [     5.31 GB] [253] [  
1] 
[sda             ] [Hitachi HDP72505               ] [   465.76 GB] [  8] [  
0]
[sda1            ] [ext3       ] [<unknown>        ] [   200.00 MB] [  8] [  
1] 
[sda2            ] [LVM2_member] [<unknown>        ] [    31.18 GB] [  
8] [  2] 
[sda3            ] [ext3       ] [<unknown>        ] [   434.38 GB] [  8] [  3] 

Which is what I expect?
If I create a file with just the disk and partition info, both sorts give 
me the correct sorts. Even if I put spaces afterwards it sorts fine, 
but if I put non-blanks it puts the sda at the end?

Any ideals on why sort is acting this way?


+----------------------------------------------------------+
  Michael D. Setzer II -  Computer Science Instructor      
  Guam Community College  Computer Center                  
  mailto:mikes@xxxxxxxxxxxxxxxx                            
  mailto:msetzerii@xxxxxxxxx
  http://www.guam.net/home/mikes
  Guam - Where America's Day Begins                        
  G4L Disk Imaging Project maintainer 
  http://sourceforge.net/projects/g4l/
+----------------------------------------------------------+

http://setiathome.berkeley.edu (Original)
Number of Seti Units Returned:  19,471
Processing time:  32 years, 290 days, 12 hours, 58 minutes
(Total Hours: 287,489)

BOINC@HOME CREDITS
SETI        10944149.476033   |   EINSTEIN     6108721.330851
ROSETTA      3318509.748210   |   ABC          6642219.200443

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux