Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sort stable

Status
Not open for further replies.

chirpyform

Programmer
Jun 20, 2003
202
FR
Is there an option with the command sort so that the order on input rests. Ex I sort a file on the first 8 chars with
sort -k 1.1,1.8 file
the problem is that if there are several lines that are the same for the first 8 chars then the sort doesn't keep the order, it will sort the rest of the line on ASCII.

With Linux there is the option -s (stable) which works exactly as I would like.

Does this command exist with UNIX?


Thanks
Chris
 
My only suggestion is to run "man sort" to see if on of the options fits you needs.
 
strangely enough it was the first thing that i did.

thanks anyway

Chris
 
Chris - don't give up. Which unix? There are several freeware scripts which will do what you require.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top