The AWK Programming Language

Awk is a powerful Unix tool. Its name derives from the surname initials of Alfred Aho, Peter Weinberger, and Brian Kernighan who originally designed it at Bell Labs in 1977. The program has a different version and implementations. A commonly used one is the gawk from the GNU (http://www.gnu.org/s/gawk/). According to the definition of one of its developer, Alfred. V. Aho: “AWK is a language for processing files of text. A file is treated as a sequence of records, and, by default, each line is a record. Each line is broken up into a sequence of fields so we can think of the first word in a line as the first field, the second word as the second field, and so on. An AWK program is a sequence of pattern-action statements. AWK reads the input a line at a time. A line is scanned for each pattern in the program, and for each pattern that matches, the associated action is executed.”

Continue reading

Unix Shell Programming Notes. Part I

UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.
Dennis Ritchie

Shell commands can be combined in script files that perform complex actions. In this first article, a concise introduction to shell programming (focusing on the csh shell) is given. In the second part, I will provide some examples of complex scripting for different applications. For other types of shells, the reader can consult comprehensive textbooks that are listed at the end of this article.

Continue reading

Yet Another Introduction To LINUX

What is Linux?

Linux is a free and open source operative system (OS) derived from the Unix OS. It is created by Linus Torvalds. Initially, it was developed for personal computer but now it is diffused on almost all the existing computer architecture. The OS is freely available in different software distribution assembled by commercial or public companies. These distros regularly release freely available open-source Linux distributions in the form of a downloadable CD, DVD or even memory stick bootable images for the easy installation and customization. The reader is recommended to try to install her own version of Linux using one of the distributions (see a list at the end of the chapter). For scientific applications, the Scientific Linux is recommended since it is customized for the use in academic and research institutions and contains most of the open source scientific packages.

In this chapter, only a short introduction to the operative system Linux is provided. The reader is encouraged to deepen her knowledge on the topic by consulting more detailed tutorials or books guide suggested at the end of the chapter.

Continue reading