gnumdata Frequently Asked Questions (FAQ)

Contents: ==================================== 1. Disclaimer 2. How do I install gnumdata ? 3. What is awk? 4. What is the difference between a data file and an actions file ? ==================================== 1. Disclaimer Read at your own risk. The current, previous, or original authors make no claim as to fitness for any purpose or absence of any errors, and offer no warranty. Do not neither eat nor drink. ==================================== 2. How do I install gnumdata ? Simply copy the gnumdata.awk file on your disk and run it with gawk on your data files and actions file. For instance if your data file is test.data just type gawk -f gnumdata.awk test.data the program will read test.stm, test.dat and it will tell you which ouput files you may use. This means of course that you have gawk installed on your system. If you are using Linux, gawk should be already inbstalled. For PC/Windows computers, you may get gawk.exe and its .dll on the gnumdata home page. The awk FAQ hast a lot of web sites where you can get various awk versions. ==================================== 3. What is awk? Awk is a programming language, named after its three original authors, Alfred V. Aho, Brian W. Kernighan and Peter J. Weinberger. "Awk is a convenient and expressive programming language that can be applied to a wide variety of computing and data-manipulation tasks.'' Most implementations of awk are interpreters which read your awk source program and parse it and act on it directly. Awk has its own FAQ, and a newsgroup, comp.lang.awk, which can be found on the Internet: ftp://rtfm.mit.edu/pub/usenet/comp.lang.awk/faq http://www.faqs.org/faqs/computer-lang/awk/faq ==================================== 4. What is the difference between a data file and an actions file ? A data file is a text file which may contain comments preceded by #, numeric or character values ("data") and a special line, called the format line (with the X's). The following lines are an example of a data file # a simple example XX XXXX XXXX XX 01 1998 120 1 02 132 1 03 138 1 01 1999 140 02 150 2 An actions file is a text file whose lines describe the action to perform on the data. For instance one may compute the numbers of non empty values in column 4, or padd the empty values of column 2 with the value from previous line with the action lines Nbval 4 Score Prev 2 Year The computation output file gnumdata.cal will contain the result, which is Column 4 "Score" number of non empty values : 5 and column 2 of the data output file gnumdata.sor is padded : # a simple example XX XXXX XXXX XX 01 1998 120 1 02 1998 132 1 03 1998 138 1 01 1999 140 02 1999 150 2 See the reference card for more options including copying these output files with specified names. ====================================

Reference

            gilles.hunault@univ-angers.fr