Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Is there a program ?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Colin Needham  
View profile  
 More options Oct 8 1990, 6:31 am
Newsgroups: rec.arts.movies
From: c...@otter.hpl.hp.com (Colin Needham)
Date: 7 Oct 90 22:05:30 GMT
Local: Sun, Oct 7 1990 6:05 pm
Subject: Re: Is there a program ?

gr...@cstr.ed.ac.uk (Grant Mason) writes:
> Does anyone out there have a Unix or C program which can 'interrogate' the
> actor/actress files? What I want to be able to do is to type in an
> actor/actress' name and get out a list of all the films which they appeared
> in.  Similarly, typing in a film name would give a list of all the
> actors/actresses who were in that film.
> Can anybody help ?  I'm not a programmer, so doing this myself is impossible.

Well I can't provide you with exactly what you want, but I have a Unix
script which might be of some use. It is included at the end of
this posting as a shell archive. I use it as part of the process of
incorporating changes in the actors list.

Note: I am posting this message rather than mailing to give others the
opportunity of experimenting with the script. I am willing to act as a
coordinator if anyone has any suggestions or working programs.

The script (called 'explist') takes a list file as an argument and produces
what I term a list database on the standard output. The format of a list
database is simply:

 <name>|<title>

To get the kind of functionality you require, run the script over the various
lists and concatenate the databases into one file. The combined database
can then be searched using 'grep', 'awk' or some other text processor. It
shouldn't take too much effort to add a simple user interface to request
a name or title and format the output.

There is one problem with the script: the actress list has to be edited
before it is processed. The name fields for "Mary Elizabeth Mastrantonio"
and "Cassandra Peterson (aka Elivira)" occupy two lines and need to be
shortened (I suggest to "Mary Mastrantonio" and "Cassandra Peterson").
Also each of the following titles are split over two lines and should be
joined on to one:

"Adventures of Buckaroo Banzai Across the Eigth Dimension, The"
"Bionic Showdown: The Six Million Dollar Man and the Bionic Woman (TV)"
"End of the World in Our Usual Bed in a Night Full of Rain, The"
"Dealing: or The Berkley-to-Boston Forty-Brick Lost-Bag Blues"

The other lists do not split long titles and hence can be processed as
published.

Hope this helps,

Col

------------------------------------------------------------
"Look at it this way, in a hundred years who's gonna care ?"
   -- The Terminator
------------------------------------------------------------
Col Needham                |  Phone: +44 272 799910 x 24131
HP Labs                    |  c...@hplb.hpl.hp.com
Bristol                    |  c...@hplabs.hpl.hp.com
U.K.                       |  c...@otter.hpl.hp.com
------------------------------------------------------------

#---------------------------------- cut here ----------------------------------
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Colin Needham <cn@otter> on Sun Oct  7 22:40:55 1990
#
# This archive contains:
#       explist
#
# Error checking via wc(1) will be performed.

LANG=""; export LANG
PATH=/bin:/usr/bin:$PATH; export PATH

echo x - explist
cat >explist <<'@EOF'
#!/bin/sh

# Author: Col Needham
#
# Usage: explist <list>
#
# Purpose: read in a list & produce a list database on the standard output

expand $1 | awk '/^[A-Z]/ {s1=substr($0,1,24)} /^[A-Z\t ]/ {print s1 "|" substr($0,25,80)}' | sed -e 's/ *|/|/' | grep -v '|$'
@EOF
set `wc -lwc <explist`
if test $1$2$3 != 947264
then
        echo ERROR: wc results of explist are $* should be 9 47 264
fi

chmod 777 explist

exit 0


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google