using sort to alphabetize

using sort to alphabetize

Post by Tom Wrig » Fri, 10 Jun 1994 07:24:56



We need the ability to sort a list alphabetically on a person's last name.
For example, given a file like this:












how should I use sort to alphabetize on the names after the first period??

Thanks!!

---
Tom Wright
OpenVision Technology
7133 Koll Center Parkway
Pleasanton, CA 94566

 
 
 

using sort to alphabetize

Post by SIEV.. » Fri, 10 Jun 1994 08:31:32



>We need the ability to sort a list alphabetically on a person's last name.
>For example, given a file like this:











>how should I use sort to alphabetize on the names after the first period??

did you read your 'sort' man pages _?_

$ sort -t. +1 input_file -o output_file
       ^^^^^^

enjoy!

 
 
 

using sort to alphabetize

Post by Frederic R.Rouss » Fri, 10 Jun 1994 17:21:45


: We need the ability to sort a list alphabetically on a person's last name.
: For example, given a file like this:


[ ... list deleted ... ]

: how should I use sort to alphabetize on the names after the first period??

Any decent version of 'sort' will be able to do what you need:

sort -t. +1

All this nifty sorting is of course described in the man page. If your current
'sort' is not able to do that get the GNU fileutils. The GNU version of 'sort'
will do that job ...

good luck.

--

Ext   : 8269          CETIA
Voice : +33 94088000  BP 144 Toulon Cedex
FAX   : +33 94088001  FRANCE

 
 
 

using sort to alphabetize

Post by Chang Byung-k » Fri, 24 Jun 1994 08:48:35


you can use `sort' command. Fistly type `man sort'.
maybe
        sort -d -t. +2 <file-name> ( not tested )
will help u.

: We need the ability to sort a list alphabetically on a person's last name.
: For example, given a file like this:












: how should I use sort to alphabetize on the names after the first period??

: Thanks!!

: ---
: Tom Wright
: OpenVision Technology
: 7133 Koll Center Parkway
: Pleasanton, CA 94566

--
     --== %%%%%%__      Chang, Byoung-Gyu
     -==  _+----||      Dept. of CS, Korea Advanced Institute of Science
    =     \_     |---.  and Technology, Taejon, Korea, 305-701
 chitos       .----"" Dorm.   : +82 42-868-6677

 
 
 

1. how to sort ip addresses using sort(1)

Hello sort gurus,

here's a little problem that's driving me nuts: I have a file with
IP addresses in dot notation, one per line, that I want to sort in
numerical order (as if they were 32bit numbers). The trouble is, that
a naive sort -n does not work, because IP adresses look like
floats only up to the second dot. Using '.' as a field delimiter does
not help either (i.e. sort -t. -n).
I wonder if there is a solution using sort(1) _alone_. I know it can be
done using perl with a custom sort function and in a plethora of
other ways involving tr,cut,whatnot etc. But that's not what
I'm looking for. I'm rather interested in a proof of concept that sort(1)
can also solve this problem.
Solutions requiring GNU sort are welcome.

Any takers?

        Jens
--
SIGSIG -- signature too long (core dumped)

2. reading lines from a text file and then printing them out

3. sort sort: 0653-657 A write error occurred while sorting (4.1.3)

4. Enlightenment: Couldn't load 22.jpg

5. Alphabetizing newsgroups?

6. ext2fs recovery?

7. Alphabetize a PICO file, How???

8. XFree86 3.3.6 and the Rage 128

9. sort: write error while sorting: No space left on device??

10. "sort" sorting uppercase/lowercase differently on different boxes

11. Sorting without "sort" ?

12. default secondary sort line in 'sort'

13. (sort | uniq) vs (sort -u)