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

Re: How to sort ignoring digits? (was: Contacts printing)



On Tue, Nov 06, 2007 at 07:43:29AM -0600, Russell L. Harris wrote:
> * Rodolfo Medina <rodolfo.medina@gmail.com> [071106 06:42]:
> > In the documentation of `sort' I couldn't find the possibility of ignoring
> > digits.  I have a document that contains names and phone numbers and I wish to
> > sort it by names.  The `-k' option doesn't seem to help because names and
> > numbers are not in definite fields.
> > 
> > Any help appreciated
> > Rodolfo
> > 
> 
> Look at Perl.  You likely can find whatever help you need on the
> Perlmongers mail list.

If he could program in Perl, he could have solved this problem aeons
ago.  It started as 300 or so numbered files of contacts.  Its now one
big file and I think he's got it down to each record on one line.  Now
he wants to sort it but the records aren't in fields.  This problem
really would have been (still could be) a terrific beginner's work in
either Perl or Python (or Ada).

Rodolfo, you'll need to send us a sample couple of lines EXACTLY as they
appear in your file so that someone who knows sort can help.

You'll also need to tell us EXACTLY what you want the file to look like
when all is said and done.  What do you want to do with this?

Doug.



Reply to: