Index on a flat file...

Index on a flat file...

Post by Timothy R Mye » Tue, 13 Sep 1994 10:50:29



--
Timothy R Myers                  | "More people would learn from their
Frederick, MD  USA               |  mistakes if they weren't so busy

 
 
 

Index on a flat file...

Post by Timothy R Mye » Tue, 13 Sep 1994 10:52:17


Does anyone know how to have indexed files as you can in VMS/RMS?  Any
direction would be greatly appreciated.

Opps, don't know where it went...


>--
>Timothy R Myers                  | "More people would learn from their
>Frederick, MD  USA               |  mistakes if they weren't so busy


--
Timothy R Myers                  | "More people would learn from their
Frederick, MD  USA               |  mistakes if they weren't so busy


 
 
 

Index on a flat file...

Post by <N.. » Thu, 15 Sep 1994 19:27:01



Quote:> Does anyone know how to have indexed files as you can in VMS/RMS?  Any
> direction would be greatly appreciated.

You don't say what system you're on!

man dbm (or ndbm)

Nick.

 
 
 

1. Flat file shells; flat file scripts

Ok, I don't claim to be the originator of this idea, but it was used
extensively at an older work site. They had a flat file engine, which
for our purposes we can dub 'ffeng'. It was written in c, kept in a
public directory. When presented with standard input and a series
of flags, it could process the data by sorting on any key in the record,
or merely present the field of the record(s) needed. It could sort
individual fields too. The program was written so that it could be
easily accessed as the 'shell' of a script, so that you could easily
code data in the form:

#!/usr/local/bin/ffeng
#
# This data file is also a script
# we'll make a database of /etc/passwd info as an example
#
tokens
user    alpha
uid     numberic
gid     numeric
shell   alpha
homedir alpha
comment alpha
endtokens
# records start here
user fflint
uid 2000
gid 10
shell /bin/bash
homedir /home/fflint
comment "Fred Flintstone"
endrecord
#
user brubble
uid 2001
gid 10
shell /bin/bash
homedir /home/brubble
comment "Barney Rubble"
endrecord
# end of file

It was a fairly powerful technique. The neat thing is that the data
become self documenting and the data also become a script for searching
on the data. The data are human readable and compact.

I'm curious if something like that is out there now, in the public
domain. If not, are there coded flat file engines that would be
readily adaptable to supporting this kind of coding technique? My
preference would be an engine in 'c', and no one has to adopt
my particular nomenclature, but I certainly could use a tool like
this, when I'm having to do common Unix systems administration tasks
on multiple systems in heterogenous environments where the number of
records to be handled is small, say, less than a couple thousand.

David.

Sent via Deja.com http://www.deja.com/
Before you buy.

2. X timings for a CTX-5468A

3. No index.html file ==> show index of /xxx?

4. newbie socket question

5. "Can't open file" ( flat file ) and "flock()unimplemented ..."

6. RFD: comp.arch.clusters

7. Are FreeBSD password/shadow files flat text files?

8. FreeBSD 3.1 Stable Kernel Recompilation

9. default file not index.html or parse a single file??

10. File Utilities for Indexed Files

11. How to get Apache excute index.cgi instead of index.html

12. help getting pieces of data from ascii flat file

13. Adding C++ index to Docsearch index?