From: kawai@csli.stanford.edu (goh kawai - n6uok)
Subject: U.S. callsign server
Organization: speech research and technology, sri international
Distribution: fj
Date: Wed, 29 Jul 1992 17:15:53 GMT

$@$_$J$5$s(J

$@JF9q$N%3!<%k%5%$%s!J%/%i%V6I$O=|$/!K$N%*%s%i%$%s%G!<%?%Y!<%9$N>R2p$G$9!#(J

$@$3$N>pJs$O$7$P$i$/A0$KN.$7$?$b$N$HF1$8$G$9!#!J$?$@$7%3!<%k%5%$%s%5!<%P$NL>>N(J
$@$,JQ99$K$J$j$^$7$?!#!K:G6a$3$N%K%e!<%9%0%k!<%W$rFI$_$O$8$a$?J}$N$?$a$K2~$a$F(J
$@>R2p$7$^$9!#(J

$@#I#n#t#e#r#n#e#t$K#I#P@\B3$5$l$F$*$i$l$k%5%$%H$NJ}$O!"$D$.$N%3%^%s%I$rMQ$$$F(J
$@%3!<%k%5%$%s%5!<%P$K%"%/%;%9$G$-$^$9!#(J

        telnet callsign.cs.buffalo.edu 2000

$@$3$l$O%m%8%+%k%"%I%l%9$G!"<B:]$K@\B3$5$l$F$$$k%^%7%s$O$H$-$I$-F~$lBX$o$k$3$H(J
$@$,$"$k$=$&$G$9!#8=:_$3$N%"%I%l%9$K@\B3$5$l$F$$$k%^%7%s$N#I#P%"%I%l%9$O<!$NDL(J
$@$j$G$9!#(J

        128.205.32.2

$@$5$F!"$3$3$K@\B3$9$k$H!"(J

	Trying 128.205.32.2 ...
	Connected to electra.cs.buffalo.edu.
	Escape character is '^]'.

	Callbook v1.3  Bug reports to bowen@cs.buffalo.edu  Type 'help' for help

	>> help
	Available commands:
	     call [filters] callsign   - lookup callsign
	     city [filters] city       - lookup city
	     help [command]            - get help on command
	     info                      - get info about server
	     more rows                 - set number of terminal rows
	     name [filters] surname    - lookup last name
	     quit                      - exit the server
	     set name|data|raw|addr    - set the display mode
	     zip [filters] zipcode     - lookup zip code

	Available regular expression filters:
	     -c   filter by callsign
	     -f   filter by first name
	     -l   filter by last name
	     -a   filter by street address
	     -z   filter by zip code
	     -t   filter by town
	     -s   filter by state (or province)

	>> call n6uok
	Call-Sign: N6UOK                    Class: EXTRA
	Previously: KC6BQM                  Class: ADVANCED
	Real Name: GOH KAWAI                Birthday: JUN 17, 1961
	Mailing Address: 333 RAVENSWOOD AVE, MENLO PARK, CA  94025
	Station Address: SAME AS MAILING ADDRESS
	Valid From: OCT 29, 1991            To: OCT 29, 2001
	Records Last Processed: OCT 29, 1991

	>> quit
	Connection closed by foreign host.

$@$H!"$3$N$h$&$K%3!<%k%5%$%s>pJs$rCN$k$3$H$,$G$-$^$9!#%3%^%s%I$O$$$m$$$mMQ0U$5(J
$@$l$F$$$^$9!#(J

$@$3$N5-;v$N:G8e$K%3!<%k%5%$%s%5!<%P$N5!G=$r@bL@$7$?5-;v$r0zMQ$7$F$*$-$^$9$N$G(J
$@;29M$K$7$F2<$5$$!#$J$*!"$3$N@bL@$O$+$J$j8E$$$N$G!":G?7$NFbMF$O%*%s%i%$%s%X%k(J
$@%W$rMQ$$$k$N$,E,@Z$G$9!#(J

$@!]2O9g!](J

----------------- Speech Research Program, SRI, Menlo Park, CA 94025-3493 USA
--- Goh Kawai --- work:(415)859-2231   fax:(415)859-5984   home:(415)323-7214
----------------- internet: kawai@speech.sri.com      radio: n6uok and jk1zyp


I had some spare time this weekend and I made some *really* handy additions
to the callsign server on marvin (anyone not familiar with the system see
the end of this message for more info). I've still got a little ways to go,
but it's far more useful than before. A quick review of new features is:

	1) regular expression filters on searching
	2) now allows to search multiple keys in one command
	3) "more" like functionality as a form of flow control
	4) callsign searches search for old calls as well as new
	5) ^W (control-w) now erases last word on command line
	6) ^X is a synonym for ^U
	7) new output format for addressing mailing labels

The biggest addition to the system was in the search capability. I've added
regular expression filters to each of the searches. You can now selectively
narrow down your search to be very picky. For those of you non-Unix folks
(and even some of you Unix folks I'm sure) who aren't familiar with regular
expressions, I've attached a portion of the BSD man page on the subject. But
suffice it to say they function very much like wildcarding (* and ?). Reading
the attached man page should give you a real good start, but here are some
examples to get you going right away:

	city -f ^d -l ^b -s ny buffalo
		Everyone in Buffalo with my initials. "-f ^d" says to allow
		all entries that start with a D in the first name. "-l ^b"
		works the same for B in the last name. And "-s ny" narrows
		the search to only New York State. Note the old syntax that
		was "city buffalo ny" is now invalid and will result in a
		search for all in the city of buffalo and the city of ny.

	name -f ^w cronkite
		A good way to find Walter Cronkite. The "-f ^w" means to only
		list the Cronkite's that have a W as the first letter of their
		first name.

	city -z ^142 -s ny buffalo
		This is how you would go about narrowing down the search on
		a city to just the first digits of the zip code. This says to
		allow any zip code that starts with 142 in Buffalo, NY.

	city -c 0 -s ny fredonia
		If you know your friend has a zero call and he lives in
		Fredonia, NY, you can search Fredonia and use a zero in the
		callsign as a search filter.

As you can see, the filters are specified with a minus sign followed by a
single letter as the filter name. This is taken from Unix command line option
standards. The possible filters are:

	-c   filter by callsign
	-f   filter by first name
	-l   filter by last name
	-a   filter by street address
	-z   filter by zip code
	-t   filter by town
	-s   filter by state

Note that using regular expressions will slow the searches down a bit. Doing
all that filtering is really CPU intensive. So don't expect lightning speed.

Also added was a "more" feature similar to the Unix "more" utility. When the
server thinks it's at the bottom of your screen, it prints "-- more --" and
waits for you to hit a key before it goes on. At this point you can type a
"return" to just list one more line, a "space bar" to get a whole new page of
text, or a "q" to quit output for this run. The server assumes your terminal
is 24 lines long. If this isn't correct you can tell the system with the new
"more" command. If you tell it your terminal has 0 lines, the "more" feature
is turned off.

The system also now knows enough to search the "previous call" field if it
can't find the call you are looking for as a current ham call. This will help
out those that are looking for people from yesteryear who have recently changed
callsigns.

Sending the server a control-W now causes it to backup over the last word you
typed. This is a standard (at least in my world) that is helpful if you don't
want to blow away the whole line with a ^U but would like something a little
faster than backspaces. I also made ^X the same as ^U. I was told this is a
standard in some systems as well.

And last, but not least, there's a new output format that makes the output
look like US Postal Service addresses. This might be used if you want to
send out a ham-fest announcement to all the hams in a given city. You can just
do a city search and trap the output directly. Then when you get a hard-copy,
just tape it on the mailing. Hope this is useful.

Well, that's about it. Now, for those of you who don't know anything about
this, the callsign server is a program running on the Internet on the host
marvin.cs.buffalo.edu (128.205.32.4) on port 2000. It speaks the telnet
protocol (pretty well, anyway) and you can access it if your site is on the
Internet. The way you do this is site specific, but the command syntax is
probably something like:

	telnet 128.205.32.4 2000

If this doesn't work for you, I'd recommend talking to you local system
administrator. The "info" and "help" commands can get you started.

For those of you not on the Internet, a mail based server is getting much
closer... Have fun.

Devon

---------------
REGULAR EXPRESSION SYNTAX
     A regular expression is zero or more branches, separated by
     `|'.  It matches anything that matches one of the branches.

     A branch is zero or more pieces, concatenated.  It matches a
     match for the first, followed by a match for the second,
     etc.

     A piece is an atom possibly followed by `*', `+', or `?'.
     An atom followed by `*' matches a sequence of 0 or more
     matches of the atom.  An atom followed by `+' matches a
     sequence of 1 or more matches of the atom.  An atom followed
     by `?' matches a match of the atom, or the null string.

     An atom is a regular expression in parentheses (matching a
     match for the regular expression), a range (see below), `.'
     (matching any single character), `^' (matching the null
     string at the beginning of the input string), `$' (matching
     the null string at the end of the input string), a `\' fol-
     lowed by a single character (matching that character), or a
     single character with no other significance (matching that
     character).

     A range is a sequence of characters enclosed in `[]'.  It
     normally matches any single character from the sequence.  If
     the sequence begins with `^', it matches any single charac-
     ter not from the rest of the sequence.  If two characters in
     the sequence are separated by `-', this is shorthand for the
     full list of ASCII characters between them (e.g. `[0-9]'
     matches any decimal digit).  To include a literal `]' in the
     sequence, make it the first character (following a possible
     `^').  To include a literal `-', make it the first or last
     character.

AMBIGUITY
     If a regular expression could match two different parts of
     the input string, it will match the one which begins
     earliest.	If both begin in the same place but match dif-
     ferent lengths, or match the same length in different ways,
     life gets messier, as follows.

     In general, the possibilities in a list of branches are con-
     sidered in left-to-right order, the possibilities for `*',
     `+', and `?' are considered longest-first, nested constructs
     are considered from the outermost in, and concatenated con-
     structs are considered leftmost-first.  The match that will
     be chosen is the one that uses the earliest possibility in
     the first choice that has to be made.  If there is more than
     one choice, the next will be made in the same manner (earli-
     est possibility) subject to the decision on the first
     choice.  And so forth.

     For example, `(ab|a)b*c' could match `abc' in one of two
     ways.  The first choice is between `ab' and `a'; since `ab'
     is earlier, and does lead to a successful overall match, it
     is chosen.  Since the `b' is already spoken for, the `b*'
     must match its last possibility-the empty string-since it
     must respect the earlier choice.

     In the particular case where no `|'s are present and there
     is only one `*', `+', or `?', the net effect is that the
     longest possible match will be chosen.  So `ab*', presented
     with `xabbbby', will match `abbbb'.  Note that if `ab*' is
     tried against `xabyabbbz', it will match `ab' just after
     `x', due to the begins-earliest rule.  (In effect, the deci-
     sion on where to start the match is the first choice to be
     made, hence subsequent choices must respect it even if this
     leads them to less-preferred alternatives.)