Re: [Noffle-users] searching for group names
Brought to you by:
bears
From: Jim H. <jim...@ac...> - 2004-10-15 09:24:14
|
On 14-Oct-2004 Dan Jacobson wrote: > Gentlemen, today we shall discuss searching for group names. E.g., > let's ask noffle what is the full name of that shortwave group. > > I see I have written a bash function to do this: > noffle_search_group () > { > noffle -g | awk -F\\t '$1~'/$@/'{print $6,$1}' | sort -k 2 > } > e.g., > $ noffle_search_group shortwave > y rec.radio.shortwave > > The problem is it is computationally expensive, judged by how long it > takes, at least on initial run. How many groups do you have? I just tried your function on my news host (a mighty K6/2 350MHz) which has 38k groups registered, and it took 3 seconds. That being said, I do think there is something to be said for the output from 'noffle -g' being by default group-name group-description and the current group-name group-server first-article-no last-article-no upstream-next-article post-status create-date last-access-date group-description being reserved for 'noffle -g -v' or 'noffle -g verbose'. The first option would reduce or remove the requirement for awk here. -- Jim Hague - jim...@ac... Never trust a computer you can't lift. |