Programming in unix shell [ KMI/SHELL ]

The course deals with shell programming in unix-like operating systems (scripting) and text processing with use of the shell.

The course freely follows the Unix-like systems course. In the first part, basics of unix shell, files, processes and text processing on unix-like operating systems are briefly reviewed. The main contents of the course, however, is then shell programming (so-called scripting, primarily Bash shell) and its utilization in stream text processing using essential software utilities bundled with unix-like operating systems and mainly the grep, sed and awk tools. In the end, national specifics (localization) and specifics of Linux, GNU and Apple Mac OS X systems are also mentioned. Everything is intensively experienced in seminars, with strong hands-on approach, in linux operating system and Bash shell.

Prerequisities: Working skills with unix-like operating systems and programming in any language.

Seminars

  1. Basic principles of unix-like operating systems, introduction to shell: Command line and interpreter (shell), manual pages and shell help, files and directories, (traditional unix) access rights, processes and their manipulation. Job control in shell, file and directory names expansion, aliases, program input and output, pipe.
  2. Basics of text processing: Text editing: editors Vi and Emacs, basic utilities, regular expressions and grep, basics of sed and awk.
  3. Shell (Bash) programming: Commands, variables (parameters), conditionals, loops, integer arithmetic, command grouping, functions, script.
  4. Shell (Bash) programming: Shell invocation, quoting, special variables, arrays, expansion ({}, of variables and paramters, words, path), command substition, further commands.
  5. Text processing: stream editor sed: Editation process, edit command, function, using shell variables.
  6. Text processing: programming language awk: Line field, pattern and action, variables, arrays, operators, conditionals, loops, functions.
  7. Localization (Czech): Localization and localization shell variables, text coding and end of lines.
  8. Specifics against Unix (POSIX standard): Linux, GNU and Apple Mac OS X specifics (desktop and terminal, command line, help, file system, system of processes, grep, Bash, sed, awk, localization).

Literature