This course provides UNIX® users and administrators hands-on skills development in POSIX shell programming. Syntax and constructs of the POSIX shell language are covered including use of variables, branches, loops, file I/O, functions, and traps. An introduction to regular expressions, awk, and sed are also discussed as each of these are commonly used in shell scripts. The 5-day course is 50 percent lecture and 50 percent hands-on labs using HPE servers.


• HP-UX and UNIX general users, system and network administrators, and software developers


• Fundamental knowledge of programming and

• UNIX Fundamentals (51434S) or

• Equivalent experience

Benefits to you

• Understand and maintain POSIX scripts already in use in your environment

• Learn how to create and run a POSIX shell program, saving time and increasing productivity with automated scripts

• Write efficient programs by understanding how shell scripts are processed

• Customize shell start-up files

• Easily control your administration tasks

Course objective

At the conclusion of this course, you should be able to:

• Read and maintain existing POSIX scripts

• Create a POSIX program

• Use looping and branching

• Use arrays

• Use regular expressions

• Use subroutines

• Use advanced data structures and functions

• Understand and use traps and signals

• Understand awk and sed

Module 1: Introduction to POSIX Shell Scripts

• What is a shell script?

• Script execution

• The subprocess environment

• Shell features

Module 2: Shell Scripting

• Which shell?

• Recommended script format

• Planning to write a shell script

• Portability issues

Module 3: Variables

• Variables

• Displaying and using variables

• Concatenation and substrings

• Other sources of data for variables

Module 4: User Input

• Reading user input

• Positional parameters

• Creating positional parameters

• Conditional substitution

• External influences

Module 5: Designing Program Output

• Variable attributes • Formatted data • Cursor positioning and terminal echo Module 6: Shell Arithmetic • Creating integer-only variables • Base10 and others • Working with arithmetic operators and data Module 7: Branches and Logic Testing • Logic testing • Conditional operators • Multiway decision branching and the case statement Module 8: Shell Patterns • Basic expressions • More complex patterns • Pattern combinations Module 9: Program Loops • The while loop • The until loop • The for loop • Breaking out of a loop • Continue and exit commands • The select loop Module 10: The getopts Command • Processing arguments • The getopts and OPTARG variable • The OPTIND variable Module 11: Array Variables • Substituting and counting • Using integer variables as element numbers Module 12: Functions and Function Libraries • Displaying current shell functions • Declaring and using functions • Variable scope • Function libraries and recursion Module 13: Managing Input and Output • File descriptors • Reading and writing using file descriptors • Redirecting, parameter lists, and here documents • Creating parameter lists from input lines Module 14: Traps and Signals • Common signals • The trap and stty commands Module 15: Regular Expressions • Regular expressions • Metacharacters • The grep command Module 16: Introduction to awk • Record processing • Pattern matching and printing • Relational expressions • awk variables Module 17: Variables, Strings, and Arithmetic Operations • awk user-defined variables • Environment variables • Arithmetic operations • String manipulation • Formatted output • Command line arguments Module 18: awk Flow Control • Conditional if, while, and for loops • Arrays • getline, next, and exit • Processing arrays • Associative arrays Module 19: Stream Editing with sed • Substituting text • Deleting and printing lines • Reading and writing files • Multiple sed editor functions

  • Brak dodanych opinii
Dodaj opinie
Cena netto
5000.00 zł
Czas trwania: 5 dni,40 godzin
Poziom trudności
Język Polski,
Język materiałów Angielski,
Prowadzący Autoryzowany trener,