On 9 December 2010 18:43, Matt Martini <[email protected]> wrote:
>
> Try this perl script. You can use it from the command line or you can put it
> in
> ~/Library/Application Support/BBEdit/Unix Support/Unix Filters/
Here's another way to to it, which will sort alphabetically even if
Bombay is capitalized:
# /usr/bin/perl
use strict; my ($trimmed, @list, %hash);
while (<>) { chomp;
for (split /, */){
$trimmed = $_; $trimmed =~ s~^\d*~~g;
$hash{$trimmed} = $_;
}
for (sort {uc($a) cmp uc($b)} keys %hash){
push @list, $hash{$_};
}
print join ", ", @list;
}
# JD
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>