Программирование средствами оболочек в UNIX/Linux
![]() |
Код: MUK-PRSH | ![]() |
Предварительная запись | ![]() |
Кол-во часов: 40 , Кол-во дней: 5 | ||
Аннотация:
На кого расчитан:
Продвинутые пользователи, администраторы систем и сетей
Предварительная подготовка:
- Общая подготовка в области коммерческой или свободно распространяемой версии UNIX либо LINUX.
- Опыт программирования приветствуется
Day 1
Module 1. History and flavours of command-line shells. POSIX standard for shells.
History of shells: Thomson’s sh, rc, Bourne, Korn, California (csh)
POSIX standard for shells.
Modern shells: Bourne Again (bash), zsh, tcsh, tclsh
Module 2. VI editor as a fundamental for UNIX shells operation.
History of editors: ed, em, ex, vi, sed, vim, emacs
Operation modes of VI editor, using command mode hot keys.
VI Improved for GNU/Linux.
Module 3. Command line editing in shells.
What is a terminal? Terminal capabilities and behaviour: terminfo command
vi vs emacs mode, using control keys in different modes.
Readline in GNU/Linux
Module 4. Basic UNIX and GNU tools for command line operation
Working with documentation system, navigating and operating file system, searching files and content, hardware information, users information, working with processes.
Module 5. Shell Scripting fundamentals.
What is script?
Which shell should interprets script.
Script format.
Comments in scripts.
Portability issues.
Day 2
Module 6. VariablesA concept of variables. Environment vs Local variables.
Variables substitution, conditional substitution.
Removing variables.
Shell built-in and special variables.
Module 7. User Input
Requesting user input: read command.
Positional parameters (command-line arguments).
Creating parameters. Shifting parameters.
Module 8. Designing program output
Basic output: echo vs print
Formatted output: printf
Advanced formatting in the terminal: tput
Module 9. Shell Arithmetic
Math in shell -- integer operations.
Base10, Base2 and other radix.
Working with arithmetic. Operators.
Floating-point math using bc tool.
Module 10. Filename generation patterns
Mass operations on files.
Available patterns.
Filename globbing.
Day 3
Module 11. Branches and Logic Testing
A concept of Return status
Logic testing: test command
Program flow branching constructs: if .. then .. elif .. else and case statements
Module 12. Program loops
The while and until conditional loops.
The for iteration loop.
The select loop.
Breaking a loop (continue, break, exit).
Module 13. The getopts Command
Parsing command-line options inside a script: getopts command.
Special shell variables OPTIND and OPTARG.
Enhanced option parsing: getopt. getopt vs getopts.
Module 14. Array Variables
Integer-indexed arrays.
Substituting and counting all elements.
Bash-style hash maps.
Module 15. Functions and Function Libraries
A concept of a shell function.
Displaying and declaring functions. Variable scope.
Function execution flow. return command.
Korn-style function libraries.
Day 4
Module 16. Managing Input and Output
A concept of file descriptors. Data flow through a process.
Managing file descriptors. Special invocation of exec command.
Passing file contents to a script. Redirecting to a loop within script.
Using here-documents.
Module 17. Traps and Signals
A concept of signals. Common and well-known signals.
Handling a signal: trap command.
Controlling generation of signals from terminal: stty command.
Module 18. Regular Expressions
A concept of regular expressions.
Metacharacters and escaping. Different flavours of regular expressions syntax.
Applying regular expressions: grep command.
Perl-compatible regular expressions: pcretest command.
Module 19. Stream Editing with sed
Mass-processing a text streams: sed command.
A generic structure of a sed command.
Printing and deleting lines. Substituting patterns in the text. Reading and writing files.
Combining sed actions. Sed scripts.
GNU-specific advanced sed constructs.
Day 5
Module 20. Introduction to AWK
Sophisticated text data processing: the awk command.
Structure of AWK program. Record processing. Pre and Post-input processing.
Pattern-matching and printing.
Complex pattern matching. Relational expressions.
AWK scripts.
Module 21. Variables, Strings, and Arithmetic Operations
User-defined variables. Reserved variables.
Accessing the environment and command-line arguments.
Arithmetic operations. String manipulation.
Formatting output.
Module 22. AWK Flow Control
Conditional operator: if
Loop constructs: for, while
getline, next and exit.
One- and multidimensional arrays. Associative arrays.
Processing arrays using special for loop.
Invoking external programs: system command.
Ссылка курса обучения | http://muk.training/courses/linux_freebsd/1405/ |
Назад в раздел |
+38 (044) 492-29-29, 594-98-98
e-mail: training@muk.com.ua
Или заполните заявку на нашем сайте.