Fats : Programming : Linux Tools

Here you can find information about:

  1. General Unix/Linux ,
  2. Text editors , including vi(m) , and (X)Emacs ,
  3. Make & Makefiles ,
  4. The sed & awk family , including sed , awk , and other relatives of sed and awk , and
  5. the version control and archiving tool CVS ,

These items correspond to some of the most useful Unix/Linux tools that support programming. Note, however, that they don't cover the Unix/Linux shell and other scripting languages. Please, consult our Shell Scripting page for information about those.

General Unix/Linux

  1. The University of Indiana has a short Introduction to Unix commands on their well linked and searchable IT Knowledge Base.

  2. Here is a neat UNIX Tutorial for Beginners from the University of Surrey.

  3. These two simple and clear tutorials from Queens University, Canada, cover (t)csh and other Unix material: Introduction to Unix Tutorial , and Advanced Unix Tutorial .

  4. The Linux Documentation Project has a number of resources for Linux users and programmers, including this Introduction to Linux , by Matchtelt Garrels (also available in pdf format), and a Pocket Linux Guide , by David Horton, (also available in pdf format).

  5. The Stanford Computer Science Education Library has a very good Unix Programming Tools 16-page tutorial, covering compilation, the gcc compiler, the make utility, the gdb debugger, the Emacs text editor, and the Unix shell.

  6. Die.net is an interesting site, which features fancy browsable Linux man pages , (i.e. the manual pages of Linux commands).

  7. You can find a great collection of computer science and programming resources, including (but not restricted to) Unix and Linux, at Softpanorama .

  8. A great collection of resources for Linux users and programmers is availabe in the Linux.org web site.

  9. The Open Group maintains a The UNIX System web site, with a very complete and useful collection of resources for UNIX users and programmers.

  10. The Berkeley Software Distribution (BSD) , is an influential variety of UNIX, developed at UC Berkeley. It was used as the base for the SunOS and the Apple MacIntosh OS-X, and for many parts of Gnu/Linux. The FreeBSD web site keeps a number of useful resources for Unix users and programmers, including an excellent documentation page . A number of original articles and tutorials, originally for the BSD 4.4, but still very useful for Unix/Linux users, is available at the FreeBSD Documentation Server .

Back to top.

Text editors

The two most popular text editors in Unix/Linux are vi, the visual editor (which was improved and renamed vim in Linux, which stands for VI iMproved), and Gnu Emacs. Vi is available in any Unix/Linux machine, Emacs in any Gnu Linux computer, and often times you can also find the XEmacs editor, which is a variant of Emacs. Fats has all the three of them. Here are a few tutorials and resources for them.

Vi(m)

  1. Wikipedia's short article on vi describes the main characteristics of this text editor, and has a number of very good links.

  2. The vi editor was designed by Bill Joy . With Mark Horton, he also wrote this tutorial to vi: An Introduction to Display Editing with Vi , which is also available in pdf format.

  3. Vim comes with its own internal tutorial. To stat that tutorial, on the Linux prompt type vimtutor .

  4. Ben Yoshino, University of Hawaii, wrote this neat, short, but very effective Mastering the VI editor tutorial. A great place to start!

  5. This Purdue University Vi Text Editor tutorial is another fast way to learn vi.

  6. If you are into the cult of vi, don't forget to visit The Vi Lovers Home Page , where you will find lots of very useful materials for vi users and worshipers.

  7. If you keep forgetting all those keystroke combinations of vi commands, you may find this vim Quick Reference Card useful. It is also available in pdf format.

  8. For advanced applications of vi, see Steve Oualline's Vim Cookbook .

  9. A list of vi FAQ .

  10. The full Vim manual and a book are available free from Sourceforge, in browsable and printable formats.

(X)Emacs

  1. Wikipedia's article on Emacs describes the history and features of this text editor, and has very good links to Emacs resources.

  2. XEmacs is a text editor based on, but divergent from, Gnu Emacs. The Wikipedia article on XEmacs explains the differences and gives a few links on Xemacs.

  3. Emacs was designed by Richard Stallman , a.k.a. RMS , the leading advocate and activist of the free software movement.

  4. Emacs and XEmacs come with their own internal tutorials. To reach the tutorial, after starting either one of these text editors, type <CTRL>-h t .

  5. The University of Texas IT Services keeps this helpful GNU Emacs Reference List , where you can quickly find the right Emacs command to do what you want to do.

  6. Jeremy Zawodny's Jeremy's Emacs Stuff site has a few Emacs resources, featuring a helpful and relatively short Emacs Beginner's HOWTO . A good place to start if you want to learn Emacs.

  7. A brief XEmacs tutorial from Ohio State University.

  8. A browsable Emacs cheat sheet from Stanford University.

  9. A printable Emacs reference card (pdf file) .

  10. A browsable XEmacs reference card .

  11. A printable XEmacs reference card (pdf file) .

  12. The official Gnu Emacs FAQ in a single huge list, from gnu.org. The same Gnu Emacs FAQ split in smaller and more manageable lists, from faqs.org.

  13. The XEmacs FAQ list.

  14. The Gnu Emacs home page has a number of resources. For copious documentation on Emacs features, see the Gnu Emacs manual , also available in pdf format.

  15. The XEmacs Project web site has a number of resources for XEmacs users, including complete documentation and manuals .

Back to top.

Make & Makefiles

From the standpoint of a programmer, the Unix/Linux utility make, and the corresponding Makefiles, are a tool to enable systematic, organized, efficient, and painless compilation of simple and complex programs. Learning how to use make, and how to write and modify Makefiles, is time well spent, and a must for whoever wants to do scientific programming, even at a very simple level. Here are a few tutorials and resources that will help you to learn and use make.

  1. This short Wikipedia article tells what the make Unix/Linux utility is about.

  2. A a simple, clear, and very clever make tutorial by Ben Yoshino, University of Hawaii. This is most likely the best place to start, if you want to learn how to write Makefiles and to use make.

  3. Makefile Getting Started is a very good and simple introduction to make and Makefiles by Brett Humphreys, Ohio University.

  4. Automating Program Compilation - Writing Makefiles is another good introduction to Makefiles and make, from Little Unix Programmers Group.

  5. For a bit more detail, see A short guide to Makefiles , by Owen Astrachan, Duke University.

  6. An Introduction to the UNIX make Utility , from Middle Tennessee State University, Computer Science Department, is a very good short introduction to this tool.

  7. On fats, as in any other Gnu/Linux machine, we have Gnu make. If you want the full detailed documentation, the Gnu make project keeps an up to date Gnu make manual in many formats, including pdf .

Back to top.

The sed & awk family

Sed and awk are relatively simple and very flexible programming languages with great capability to do one time things, such as generating, editing, or reordering data in column format files, modifying the occurrences of a particluar string on a group of files, etc. More often than not, sed and awk programs are very efficient and very simple (but sometimes cryptic) one liners, which makes the use of both languages attractive. Sed and awk can be used directly on the Unix/Linux command line or in shell scripts, and are typically used for pre- and post-processing of input and output data files for other programs written in C or Fortran, whose file formatting capabilities require a more intensive programming effort.

Sed

  1. The Wikipedia article on sed describes the capabilities and basic syntax of the stream editor, and gives a good set of links with additional resources.

  2. This An Introduction to sed , from Harvey Mudd College, is a very simple and clear tutorial.

  3. A collection of useful sed one liner programs .

  4. Sourceforge archives a wealth of sed resources . In the sedder's grab bag you can find scripts, tutorials, and more!

  5. This series of short by example articles on sed, by Daniel Robbins, Gentoo Technologies, is available from IBM:

  6. A good list of sed resources , by Eric Pement, Northpark University.

  7. The Softpanorama web page SED as a Pipe Tool , has good examples of uses of sed, and a number of excellent links to other sed resources.

  8. This Sed and Regular Expressions web page, by Yao-Jen Chang has a number or interesting applications of sed.

  9. A very readable introduction to sed, also available in pdf format, is this 1978 original article that defines the goals and capabilities of the stream editor: SED - A Non-interactive Text Editor , by Lee E. McMahon , the designer of sed. (Not to be confused with Lee McMahon, The Tivoly 's bandleader.)

    McMahon, who had a Ph.D. degree in Psychology from Harvard and worked for Bell Labs, explains in the article how the stream editor works. In all examples the input data are these opening verses of Kubla Khan , the psychodelic poem published in 1816 by Samuel Taylor Coleridge , which are edited in several ways using sed:

    
          In Xanadu did Kubla Khan
          A stately pleasure dome decree:
          Where Alph, the sacred river, ran
          Through caverns measureless to man
          Down to a sunless sea.
    
          
  10. A complete set of sed FAQ .

  11. On Linux machines like fats, you get the flavor of sed produced by the Gnu project. If you want complete documentation, the Gnu sed project web site maintains the full Gnu sed User's Guide , in several file formats, including PostScript .

  12. One of the few books available on sed is: Dale Dougherty, and Arnold Robbins, sed & awk, 2nd. Edition O'Reilly & Associates, Inc., Sebastopol, CA, 1997.

Awk

  1. The Wikipedia article on awk gives a good general description of the language capabilities and syntax, and very good links to related sites.

  2. This Getting started with awk , from Harvey Mudd College, is a simple and clear tutorial.

  3. A slightly more detailed An Awk Tutorial , from Vectorsite.net.

  4. This series of short by example articles on awk, by Daniel Robbins, Gentoo Technologies, is available from IBM:

  5. The Softpanorama web page AWK Programming , has good examples of uses of awk, and a number of excellent links to other awk resources.

  6. A good list of awk resources , by Eric Pement, Northpark University.

  7. A list of awk FAQ .

  8. On Linux machines like fats, you get the flavor of awk produced by the Gnu project, a.k.a. gawk. If you want complete documentation, the Gnu awk (gawk) project web site maintains the full Gnu awk User's Guide , in several file formats, including pdf .

  9. The best reference and cookbook on awk is authored by the designers of the language, whose initials were used to christianize their creature: Alfred V. Aho, Brian W. Kernighan, and Peter J. Weinberger The AWK Programming Language , Reading, MA, 1988. Brian Kernighan, one of the authors, keeps this awk web page with book errata, source code for the book examples, etc. Incidentally, another author, Alfred Aho is a professor at Columbia University. The third author is Peter J. Weinberger, or PJW , whose mugshot picture , merged with the AT&T logo, became famous in a cult pioneer book of digital photography .

Other relatives of sed and awk

Besides awk and sed, Unix (and Linux) have a number of software tools that can help you write effective and simple scripts to do very useful things. Unix tools are very simple. Some of them are grep, cut, paste, sort, join, merge, etc. These tools were designed following the basic minimalist Unix philosophy: do one thing, and do it right. However, these tools can be combined easily, each tool doing its own thing, to produce quite complex programs. If you know which Unix tools to use, and how to combine them to reach your goal, you can write effective scripts and program prototypes in record time.

  1. Softpanorama gives a good summary of Classic (pipable) Unix Tools , with examples, links to related sites, etc.

  2. You can find more information about Unix tools and Unix shell scripting on our Shell Scripting page.

  3. The main reference book on Unix tools and environment is: Brian W. Kernighan and Rob Pike, The UNIX Programming Environment , Prentice Hall, Englewood Cliffs, NJ, 1984. One author, Brian Kernighan, keeps a web page for the book, with the examples source code, book errata, etc.

Back to top.

CVS

This is a list of useful miscellaneous software available on fats.

  1. The Concurrent Versions System or CVS is a version control system that you can use to keep track of changes and updates in any tree of directories and files, particularly of programs source code. CVS was developed by Per Cederqvist.

    The CVS manual , list of FAQ , an Introduction to CVS , and a tutorial , are available online.

    The current version of CVS installed on fats is 1.11.1p1.

  2. If you need assistance with CVS or other software on fats, please contact Gus Correa

Back to top.

Last updated on by Gus Correa.