Pretty clear, URL followed by name, line by line. Trouble is the list grows like topsy and it becomes hard to find what you are looking for in an unordered list. No problem! This:\\HSM1000\MP3\Clancy Brothers.m3u Clancy Brothers \\HSM1000\MP3\David Massengill.m3u David Massengill \\HSM1000\MP3\Eileen McGann.m3u Eileen McGann . . . http://211.58.56.250:8700 [R]Blues On Air http://205.188.234.38:8040 [R]CelticGrove http://64.246.34.89:8060 [R]Dogtown Saloon http://216.237.145.19:8810
does the trick quite nicely. Note that I've annotated my soundcast URLs with 'R' so that they sort but do so seperately.#!/usr/bin/perl # SortBM.pl -- sort WinAmp Bookmark file. use strict; use warnings; use diagnostics; my %list; my $url = ''; while (<>) { chomp; if ($url) { $list{$_}=$url; $url = ''; } else { $url = $_; } } if ($url) { $list{$_}=$url; } for (sort keys %list) { print "$list{$_}\n$_\n"; }
--hsm
"Never try to teach a pig to sing...it wastes your time and it annoys the pig."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WinAmp, Bookmarks and Implicate Order
by halley (Prior) on May 14, 2003 at 19:30 UTC | |
by hsmyers (Canon) on May 14, 2003 at 20:49 UTC | |
|
Re: WinAmp, Bookmarks and Implicate Order
by Aristotle (Chancellor) on May 21, 2003 at 13:16 UTC |