LSTOWN-L Archives

LISTSERV List Owners' Forum

LSTOWN-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Stan Ryckman <[log in to unmask]>
Wed, 13 Jan 1999 19:36:12 -0500
text/plain (42 lines)
At 01:55 PM 1/11/99 -0500, Gilles Frydman wrote:
>I have  a small request for change in the way information is formatted when
>doing a query.
>
>For subscribers who have given a validated name the information appears as :
>
>        Subscription options for "Any Name" <[log in to unmask]>, list LISTNAME:
>
>But with subscribers who refuse to give any name the information becomes:
>
>        Subscription options for [log in to unmask], list LISTNAME:
>
>The small change I am asking would be to keep that email address between
>similar brackets as when it is attached to a name.
>Otherwise, it becomes very difficult to parse data from query results :-)

Nobody's suggested it yet, but it is possible to process it yourself.
(In fact, you imply that's what you want to do anyway :)  If you're
anywhere near a UNIX box, or have anything like UNIX tools (e.g., the
MKS toolkit), the command:

sed -e "s/[^ ]*@[^, ]*/<&>/" -e "s/<</</" -e "s/>>/>/"

converts lines such as:
Subscription options for "Any Name" <[log in to unmask]>, list LISTNAME:
Subscription options for [log in to unmask], list LISTNAME:

to:
Subscription options for "Any Name" <[log in to unmask]>, list LISTNAME:
Subscription options for <[log in to unmask]>, list LISTNAME:

for example.  (It's a bit simple minded... if "Any Name" contains
@, <<, or >> then you need to be a bit tricker  :)

It's not as tricky as its ugliness might imply... it just (for each line):
  1. puts < > around the first occurrence of X@Y
       where X is anything not a space, and Y anything not a space or comma;
  2. "fixes" the << and >> that #1 created when < and > were already there.

Cheers,
Stan

ATOM RSS1 RSS2