From owner-freebsd-questions@freebsd.org Fri Apr 7 18:43:15 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F695D331BF for ; Fri, 7 Apr 2017 18:43:15 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay15.qsc.de (mailrelay15.qsc.de [212.99.187.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4EFC1C5 for ; Fri, 7 Apr 2017 18:43:14 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay15.qsc.de; Fri, 07 Apr 2017 20:43:05 +0200 Received: from r56.edvax.de (port-92-195-127-117.dynamic.qsc.de [92.195.127.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 881763CBF9; Fri, 7 Apr 2017 20:43:04 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v37Ih3WR001978; Fri, 7 Apr 2017 20:43:03 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 7 Apr 2017 20:43:03 +0200 From: Polytropon To: "Steve O'Hara-Smith" Cc: Andrea Venturoli , freebsd-questions@freebsd.org, Ernie Luzar Subject: Re: Is there a database built into the base system Message-Id: <20170407204303.ce972e0d.freebsd@edvax.de> In-Reply-To: <20170407075258.5f0712fcd39d70373e9a6d37@sohara.org> References: <58E696BD.6050503@gmail.com> <69607026-F68C-4D9D-A826-3EFE9ECE12AB@mac.com> <58E69E59.6020108@gmail.com> <20170406210516.c63644064eb99f7b60dbd8f4@sohara.org> <58E6AFC0.2080404@gmail.com> <20170406210540.GO2787@mailboy.kipshouse.net> <20170407064340.a8354c6e21988c125c02c06a@sohara.org> <20170407075258.5f0712fcd39d70373e9a6d37@sohara.org> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay15.qsc.de with 0F0BC69FDCC X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.2718 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Apr 2017 18:43:15 -0000 On Fri, 7 Apr 2017 07:52:58 +0100, Steve O'Hara-Smith wrote: > On Fri, 7 Apr 2017 08:21:16 +0200 > Andrea Venturoli wrote: > > > On 04/07/17 07:43, Steve O'Hara-Smith wrote: > > > On Thu, 6 Apr 2017 14:05:41 -0700 > > > Karl Young wrote: > > > > > >> I'd suggest, Python, Perl, TCL, Ruby, ... anything but csh (or bash) > > >> for a job like this. > > > > > > Trouble with that is the OP wanted something in the base system > > > and the only scripting languages in base are the shells and awk. > > Indeed. I think the best options within the base are awk or C/C++ > with db (btree), although shell supported by grep, sed, sort et al. is > possible - after all there's a complete SQL implementation written that way > in shql. I'd say it depends on performance expectations. When you do the database magic with grep/sed/awk/cut/tr/bc etc., you can enclose everything in a sh wrapper. But performance will not be that good especially for higher input volumes or more complex algorithms. You can achieve much better results in using C with the BerkeleyDB interface. Every solution has its advantages and downsides, though. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...