Unix-like systems and shell [ KMI/UNIX ]
The course introduces students with unix-like operating systems, their principles and specifics, shell programming and text processing.
In the first part, unix-like operating systems are introduced, with their user environments and systems of help, files and processes. Main contents of the second part are then basics of shell programming (so-called scripting, primarily Bash shell) and its utilization in advanced text processing using essential software utilities bundled with unix-like operating systems. During the course, specifics of Linux, GNU and Apple Mac OS X systems are also mentioned. Everything is intensively experienced in practices, with strong hands-on approach, in the mentioned operating systems and Bash shell.
Prerequisities: Basic knowledge and skills with operating systems on user level and programming in any language.
Lectures
- Introduction of unix-like operating systems: Operating system, Unix, GNU, Linux, distribution.
- User environments, help: Graphical (desktop), textual (terminal), command line and interpreter (shell), manual pages and shell help.
- Basic principles, systems of files and processes: Files and directories, commands and programs for working with them, (traditional unix) access rights, processes and their manipulation.
- Introduction to shell, jobs and a pipe: Job control, file and directory names expansion, program input and output, pipe.
- Text processing: basic utilities and grep: (Plain) text, cat, head, tail, wc, sort, cut, paste, diff, …, regular expressions and grep.
- Shell (Bash) programming: Commands, variables (parameters), conditionals, loops, integer arithmetic, command grouping, functions, script.
- Shell (Bash) programming: Shell invocation, quoting, special variables, arrays, expansion ({}, of variables and paramters, words, path), command substition, further commands.
- Text processing: stream editor sed: Editation process, edit command, function, using shell variables.
- Text processing: programming language awk: Line field, pattern and action, variables, arrays, operators, conditionals, loops, functions.
- Localization (Czech): Localization and localization shell variables, text coding and end of lines.
- 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).
Literature
- Vychodil V.: Linux: Příručka českého uživatele. Computer Press, 2003. ISBN 80-7226-333-1
- Sobell M. G., Helmke M.: A Practical Guide to Linux Commands, Editors, and Shell Programming (4nd Edition). Addison-Wesley, 2017
- Sobell M. G.: Mistrovství v Linuxu: Příkazový řádek, shell, programování. Computer Press, 2007. ISBN 9788025117262
- Herold H.: awk & sed: Příručka pro dávkové zpracování textu. Coputer Press, 2004. ISBN 9788025103098
- Blum R., Bresnahan C.: Linux Command Line and Shell Scripting Bible, 3rd Edition. Wiley, 2015
- kolektiv: Linux: Dokumentační projekt, 4. aktualizované vydání. Computer Press, 2008. ISBN 9788025115251
- Cannon J.: Linux for Beginners: An Introduction to the Linux Operating System and Command Line. CreateSpace Independent Publishing, 2014
- Čada O.: Mac OS X Shell krok za krokem. Grafika Publishing s.r.o., ISBN 80-903152-2-4
- Ray D. S., Ray Eric J.: Unix: podrobný průvodce. Grada, 2009. ISBN 978-80-247-2125-5
- Cooper M.: Advanced Bash-Scripting Guide. Open Publication License, 2007