I have a fairly long fortune file ( http://home.kreme.com/mysigs.txt ) that I would like to sort in alphabetic order, excepting leading punctuation or supper common words like 'a', 'the', 'I', &c.
I have two problems, one of which I think is trivial, so let's cover that one first.
I need to capture the entire 'fortune' from % %, but fortune files don't have a leading % or a closing % at the file boundaries. Many of the fortunes are multiple lines, and I do not want to muck up the formatting when I sort.
The second problem, of course, is excluding a list of words I consider 'common' from the sort. For example,
"May the forces of evil become confused on the way to your house"
I would have both 'the' and 'may' in my exclusion list, so that should sort based on 'forces'.
"If a pig looses its voice, is it disgruntled"
would be sorted under 'pig'
Ideas? Probably a perl script, huh?
-- Mac OSX - Because making Unix user-friendly was easier than fixing Windows.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "support@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~-
Oct 18
Jonathan Lundell Re: Sorting fortune file
Oct 18, 2009; 15:59
Jonathan Lundell
Re: Sorting fortune file
Oct 18
Bruce Van Allen Re: Sorting fortune file
Oct 18, 2009; 16:17
Bruce Van Allen
Re: Sorting fortune file
Oct 18
Bruce Van Allen Re: Sorting fortune file
Oct 18, 2009; 16:52
Bruce Van Allen
Re: Sorting fortune file
Oct 18
Bruce Van Allen Re: Sorting fortune file
Oct 18, 2009; 17:22
Bruce Van Allen
Re: Sorting fortune file
Oct 18
Jonathan Lundell Re: Sorting fortune file
Oct 18, 2009; 17:35
Jonathan Lundell
Re: Sorting fortune file
Oct 18
Bruce Van Allen Re: Sorting fortune file
Oct 18, 2009; 17:53
Bruce Van Allen
Re: Sorting fortune file
Oct 18
Bruce Van Allen Re: Sorting fortune file
Oct 18, 2009; 18:20
Bruce Van Allen
Re: Sorting fortune file
Oct 18
Jonathan Lundell Re: Sorting fortune file
Oct 18, 2009; 18:31
Jonathan Lundell
Re: Sorting fortune file
Oct 18
Bruce Van Allen Re: Sorting fortune file
Oct 18, 2009; 18:48
Bruce Van Allen
Re: Sorting fortune file
Oct 18
Jonathan Lundell Re: Sorting fortune file
Oct 18, 2009; 19:17
Jonathan Lundell
Re: Sorting fortune file
Oct 18
Lewis@Gmail Re: Sorting fortune file
Oct 18, 2009; 23:33
Lewis@Gmail
Re: Sorting fortune file
Oct 19
Bruce Van Allen Re: Sorting fortune file
Oct 19, 2009; 06:34
Bruce Van Allen
Re: Sorting fortune file
Oct 19
Ronald J Kimball Re: Sorting fortune file
Oct 19, 2009; 11:34
Ronald J Kimball
Re: Sorting fortune file
Oct 19
Bruce Van Allen Re: Sorting fortune file
Oct 19, 2009; 11:39
Bruce Van Allen
Re: Sorting fortune file
Oct 19
Christopher Stone Re: Sorting fortune file
Oct 19, 2009; 12:41
Christopher Stone
Re: Sorting fortune file
Oct 19
Lewis@Gmail Re: Sorting fortune file
Oct 19, 2009; 14:02
Lewis@Gmail
Re: Sorting fortune file
Oct 19
Lewis@Gmail Re: Sorting fortune file
Oct 19, 2009; 14:14
Lewis@Gmail
Re: Sorting fortune file
Oct 20
peter boardman Re: Sorting fortune file
Oct 20, 2009; 10:15
peter boardman
Re: Sorting fortune file
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!