Flat File Database Program for Linux - a Tutorial

Published: 26 October 2014
on channel: Ian Forsyth
2,196
10

An introduction and tutorial for "fields.awk", a flat-file database program written in shell scripting language and "awk" scripting language.

Written by Ian R. Forsyth, 2005-2014.
Copyright 2014, Ian R. Forsyth

This program is intended for personal use by users of the linux operating system on their home computers. It should run on any Linux distro, which uses bash as the default command line shell. However bear in mind it has awk modules, so awk or gawk (the GNU version of awk) must also be installed as dependencies.

There is also one section of code (that for interactively creating a new database file from within the program interface) which uses the command "seq" in a for-loop structure. The "seq" command is a bash shell built-in, so it should be available on most installations but I can't say how newer versions of bash might behave.
*March, 2018: new_data() rewritten to replace dependence on the 'seq' utility as it occasionally led to buggy behavior. Replacement code uses an associative array instead.

Fields.awk might also run in a command-line shell under Mac OSX, assuming awk for Mac were also installed. According to this webpage (https://developer.apple.com/library/m...) awk for Mac does exist, but I cannot guarantee that my program will run on OSx as I have not tested it.
*March, 2018: Confirmed fields.awk does run on Mac OS X on the bash shell.

UPDATE: (Jan 20, 2015) I now have fields.awk running successfully on a Samsung tablet running Android OS. In order to do this you must first install the app "ZShaolin" (https://play.google.com/store/apps/de...) which is amazing because it includes almost full shell functionality including Awk and Lua scripting. The minimal shell terminal emulator apps are insufficient but ZShaolin has everything required. A few modifications are necessary to the script in this environment but once made it runs the same as on a laptop or desktop.

Fields.awk is presented as free software under the GNU GENERAL PUBLIC LICENSE, a copy of which would be included with the program.

Cheers
____________________________________________________

Update, April 2018:
I have just completed a tutorial book on fields.awk, available in both epub and paperback formats on Lulu.com.

E-book version here:
http://www.lulu.com/shop/ian-forsyth/...
Or on Barnes&Noble here:
https://www.barnesandnoble.com/w/fiel...

The book describes a host of revisions and enhancements made to the basic script presented in this older video. It presents a step-by-step guide for creating various versions of the program, from absolute bare-bones to fully-featured. In depth code analysis describes the inner workings of each module; includes many screen-captures and an Appendix devoted to debugging syntax error issues.
-- Ian R. Forsyth


On this page of the site you can watch the video online Flat File Database Program for Linux - a Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Ian Forsyth 26 October 2014, share the link with friends and acquaintances, this video has already been watched 2,196 times on youtube and it was liked by 10 viewers. Enjoy your viewing!