Scientific Supercomputing at the NIH

Scripting Languages

Listed below are scripting languages available on the Helix Systems, with brief descriptions and links to more information about how to use them.

Scripting languages allow a series of commands to be written to a file, and then run by calling the command path with the script file as the argument:

[helix]$ /bin/zsh /path/to/script.zsh

Alternatively, the script can contain a '#!' ("shebang") at the top, which will identify which language should interpret the script. In this case, the script can be a stand-alone executable:

[helix]$ head -1 script.pl
#!/usr/bin/perl
[helix]$ ./script.pl

Several of the languages are command-line shells, complete with customizable startup files.

Perl

Perl is a highly extensible scripting language, with many modules are available for interfaces to databases, HTML, XML, C, C++, and a wide variety of system functions.

  • Path:
    /usr/bin/perl (v5.8.7, 32-bit)
    /usr/local/perl-5.8.8/bin/perl (v5.8.8, 32-bit)
    /usr/local/perl-5.8.8-x86_64/bin/perl (v5.8.8, 64-bit)

Python

Python is another scripting language like Perl, but is closer to a strict programming language and is less extensible.

  • Path:
    /usr/bin/python (v2.4, 32- and 64-bit)
    /usr/local/bin/python2.3 (v2.3, 32-bit)
    /usr/local/python-2.5/bin/python (v2.5, 32-bit)
    /usr/local/python-2.5_x86_64/bin/python (v2.5, 64-bit)
    /usr/local/python-2.6/bin/python (v2.6, 32-bit)
    /usr/local/python-2.6_x86_64/bin/python (v2.6, 64-bit)

bash

The default shell of Linux operating systems, Bourne-again shell is another derivative of Bourne shell that incorporates many useful features, such as tab completion, associative arrays and array manipulation, pattern matching, command history, aliases, random number generation, user-defined functions/subroutines.

  • Path: /bin/bash
  • Startup files:
    ~/.bash_profile (only for interactive login shells)
    ~/.bashrc

sh

The Bourne shell is functional and reliable, with command substitution, for/while/case/if blocks, and output redirection.

  • Path: /bin/sh
  • Startup files:
    ~/.profile

csh

C shell (csh) syntax was based on the programming language C. While it has many of the same features as Bourne shell, C shell lacks many others, such as associative arrays, pattern matching, and user-defined functions.

  • Path: /bin/csh
  • Startup files:
    ~/.login (only for interactive login shells)
    ~/.cshrc
  • Exit files:
    ~/.logout

ksh

A derivative of the Bourne shell and C shell, the Korn shell includes additional scientific functionality, such as floating point arithmetic, date and time manipulation, and more complex TCP client/server functionality.

  • Path:
    /bin/ksh
  • Startup files:
    ~/.profile

tcsh

A updated version of C shell, with command line completion, pattern matching, search and replace, and even spell checking.

  • Path: /bin/tcsh
  • Startup files:
    ~/.login (only for interactive login shells)
    ~/.tcshrc
    ~/.cshrc (if ~/.tcshrc is not present)
    ~/.cshdirs
  • Exit files:
    ~/.logout

zsh

A recent descendent of bash, with added functionality such as floating-point math, client/server emulation, and the ability to pre-compile scripts.

  • Path: /bin/zsh
  • Startup files:
    ~/.zshenv
    ~/.zprofile (only for interactive login shells)
    ~/.zshrc
    ~/.zlogin (only for interactive login shells)

Tcl/Tk

Tcl is a well-known dynamic programming language with many unique features. Tk is a graphical counterpart to Tcl.

  • Path: /usr/bin/tclsh

PHP

PHP is a general-purpose scripting language used mainly for web applications and development.

  • Path: /usr/bin/php