Just curious if anyone has seen this before. Not really a server related question but I'm a member of this forum and you guys are pretty smart so here goes.
Let's say I have a file:
Goatboy,4
Harwood,12
Pacman,22
CandyAndy,10
Chadwick,55
Goatboy,10
SeaMonkey,2
Buttprimer,15
Cancer,12
and I want to sort first alph on field 1 and second numerically on field 2. I use the sort syntax
sort -t, -k1 -k2n sortfilenamehere
The desire would be something like this.
Buttprimer,15
Cancer,12
CandyAndy,10
Chadwick,55
<b>Goatboy,4</b>
<b>Goatboy,10</b>
Harwood,12
Pacman,22
SeaMonkey,2
but what I actually am getting is
...
Goatboy,10
Goatboy,4
...
If I just sort on field 2 numerically sort understands that 4 comes before 10...
sort -t, -k2n sortfilenamehere
Anyone have any advice here? I'm using bash on a FC 6 and I've also tried on a RHEL4 box.
Warmongr
Let's say I have a file:
Goatboy,4
Harwood,12
Pacman,22
CandyAndy,10
Chadwick,55
Goatboy,10
SeaMonkey,2
Buttprimer,15
Cancer,12
and I want to sort first alph on field 1 and second numerically on field 2. I use the sort syntax
sort -t, -k1 -k2n sortfilenamehere
The desire would be something like this.
Buttprimer,15
Cancer,12
CandyAndy,10
Chadwick,55
<b>Goatboy,4</b>
<b>Goatboy,10</b>
Harwood,12
Pacman,22
SeaMonkey,2
but what I actually am getting is
...
Goatboy,10
Goatboy,4
...
If I just sort on field 2 numerically sort understands that 4 comes before 10...
sort -t, -k2n sortfilenamehere
Anyone have any advice here? I'm using bash on a FC 6 and I've also tried on a RHEL4 box.
Warmongr