*BSD News Article 30091


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!ihnp4.ucsd.edu!swrinde!cs.utexas.edu!geraldo.cc.utexas.edu!dopey.cc.utexas.edu!not-for-mail
From: vax@dopey.cc.utexas.edu (Vax)
Newsgroups: comp.os.386bsd.questions
Subject: A database question [NetBSD-0.9] [Q]
Date: 6 May 1994 00:51:28 -0500
Organization: The University of Texas - Austin
Lines: 20
Message-ID: <2qclt0$mv5@dopey.cc.utexas.edu>
NNTP-Posting-Host: dopey.cc.utexas.edu

I would like to store an indeterminate number of filenames associated with
a given file.  That is, one filename will have priority, and the others will be
stored in a database of some sort.  I would like lookup based on the actual
filename, or any of its aliases, and also a list of all actual filenames, or
all aliases.
(That is; get a list of aliases from the actual, get the actual from an
alias, etc)

The db stuff that comes with NetBSD-0.9 seems to be oriented towards one-key
one-value, and it suggests that variable-length fields (like filenames?) are
padded (to some maximum length?) with padding chars.
Of course, I really don't have a "maximum" filename length, and storing even
1024 bytes per ``filename'' is completely unacceptable.

Does anyone have any idea how I would implement this from within a shell
script?
I would like to use as little C (and Perl) code as possible.
-- 
Protect our endangered bandwidth - reply by email.  NO BIG SIGS!
VaX#n8 vax@ccwf.cc.utexas.edu - Don't blame me if the finger daemon is down