Is there a database built into the base system

Karl Young karly at
Fri Apr 7 21:34:12 UTC 2017

Tomasz Rola(rtomek at 02:11:01 +0200:
> On Thu, Apr 06, 2017 at 05:14:40PM -0400, Ernie Luzar wrote:
> [...]
> > inbound source ip address hits my front door. Have 3 flat text files
> > containing about 2000 ip address having a record size of 30 bytes.
> > I am afraid I may be approaching the max file size that csh can handle.
> > Thinking of simple db where the 3 files are indexed and can be
> > read/written with out sequentially process all the records. At the
> > proof of concept stage.
> If I had problem processing 2000 records (or 60 kilobytes) on a
> machine less than 20 years old, I would definitely rethink my
> strategy/algorithm.
> > I have programmed in pear script before where I can open a file and
> > process a record sequentially where only the next record is
> > buffered. csh does not have that kind of file handling that I know
> > of.
> > 
> > You have any suggestions?
> I understand you need to run this under base system (because you want
> no ports). I guess you need to do "man awk" - it seems to be the only
> language capable enough in such environment. Albeit if you are
> masochist, you can stay with csh or learn sh (and sort, cut and few
> other things).

Ah, I thought there was perl and python in base system.  If not, then I
second the awk recommendation.  Awk is powerful enough, and should be
fast enough for what OP has described.

But I wouldn't suggest to learn awk from man page.  "The Awk Programming
Language", written by the inventors of Awk, is a lovely book and even has
a whole chapter on databases.

And, it's available for free.



> -- 
> Regards,
> Tomasz Rola
> --
> ** A C programmer asked whether computer had Buddha's nature.      **
> ** As the answer, master did "rm -rif" on the programmer's home    **
> ** directory. And then the C programmer became enlightened...      **
> **                                                                 **
> ** Tomasz Rola          mailto:tomasz_rola at             **
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list