Intro to Unix and More Shell Scripting - UNX110

This 5-day course provides a comprehensive introduction to the full range of UNIX user commands and utilities. Students will develop shell programming, vi editing skills, sed, and awk proficiency.  This is more of a unix bootcamp that takes students from introductory topics of our 4 day Fundamentals of Unix training course then includes subjects from our 3-Day Unix Shell Programming training course.  Unix Shell scripts provide a way to automate commonly executed groups of commands - but shell scripts can do much more than this. Although many simple tasks are automated with small scripts, large scripts hundreds of lines long are very common. These larger scripts are written by system administrators, database administrators, testers, utility programmers, and others to create utilities that are largely composed of powerful UNIX commands, such as find, sed, awk, and hundreds of others.  In this course, students learn to read, write, and debug Korn shell scripts. Back at work they can greatly increase productivity by automating repetitive tasks (for themselves or others), and by creating specifically tailored utilities designed to meet their precise needs.


Course ID: UNX110
Duration: 5 days
Audience: Unix and Linux programmers,students who are new to the unix or linux environment
Prerequisites: None
Topics:

Getting Started

  • What is UNIX?
  • A Brief History of UNIX
  • Logging In
  • Logging Out
  • Try a Few More Commands
  • Changing Your Password
  • Using On-line Manuals

The File System - Files

  • What is a File?
  • The ls Command
  • The cat Command
  • The more and pg Commands
  • The head and tail Commands
  • The cp Command
  • The mv Command
  • The rm Command
  • File names

The File System - Directories

  • Hierarchical File System
  • Pathnames
  • The pwd Command - Print Working Directory
  • The cd Command - Change Directory
  • The mkdir Command - Make Directories
  • The rmdir Command - Remove Directories
  • The cp Command (again) - Copy Files
  • Two useful directory names - . and ..

Editing With vi

  • What is vi?
  • The vi Buffering Process
  • Command Mode and Insert Mode
  • Modes Diagram
  • Getting Started
  • Moving the Cursor Around
  • Inserting Text
  • Deleting a Character or Line
  • Undo Last Command
  • Opening a New Line
  • Save Your Work or Abort the Session
  • Review of vi Commands

More Editing With vi

  • Scrolling the Buffer
  • Cursor Motion Commands - w, W, b, B, e, E
  • Cursor Motion Commands - $, ^, 0, G
  • Cursor Motion Commands - f, t, F, T
  • Delete Operator - d
  • Change Operator - c
  • Yank Operator - y
  • Put Commands - p, P
  • Searching For a Pattern - /, n, N, ?
  • The join Command
  • The file Command - :f
  • Edit file Command - :e
  • Cut and Paste Between Files
  • Read file Command - :r
  • Set options Command
  • Set options Command - .exrc file

Personal Utilities

  • The date Utility
  • The bc Utility
  • The expr Utility
  • The cal Utility
  • The news Utility
  • The id Utility
  • The uname Utility
  • The finger Utility
  • The script Utility
  • The clear Utility
  • Appendix: The at and crontab Utilities

Text Handling Utilities

  • The grep Utility
  • The tr Utility
  • The cut Utility
  • The paste Utility
  • The sort Utility
  • The wc Utility
  • The diff Utility
  • The lp Utility

File System Security

  • File Permissions
  • The chmod Utility
  • Directory Permissions
  • The umask Command

File System Management Utilities

  • The find Utility
  • The df Utility
  • The du Utility
  • Compressing Files
  • The ln Utility
  • The ulimit Utility
  • The tar Utility

Communication Utilities

  • The write and talk Utilities
  • The mesg Utility
  • Mail Overview
  • The mail Utility
  • The mailx Utility

Using the Shell

  • What is a Shell?
  • Which Shell?
  • The Command Line
  • Standard Input, Standard Output and Standard Error
  • Using Default Standard In and Standard Output
  • I/O Redirection
  • Appending Output of a File
  • Pipes
  • The tee Utility

Filename Generation

  • Filename Generation
  • The ? special Character
  • The * special Character
  • The [ ] special Characters
  • The ! special Characters

UNIX Processes

  • What is a Process?
  • Process Structure
  • The ps Utility
  • Options to the ps Utility
  • Background Commands
  • Killing Background Processes
  • Redirecting the Standard Error

Introduction to sed

  • About sed
  • Why Use sed?
  • Invoking sed
  • How sed Works
  • Using sed
  • sed Addressing
  • sed Functions

Introduction to awk

  • How awk Programs Work
  • Running awk Programs

Awk Patterns

  • Summary of Patterns
  • BEGIN and END
  • Expressions
  • String-Matching Patterns
  • Extended REs in awk
  • Range Patterns

Shell Programming Concepts

  • What is a Shell?
  • What is a Shell Script?
  • Why Use Shell Scripts?

Flow Control

  • The Exit Status of Commands
  • Command Line Examples
  • The test Command
  • The if-then-else Construct
  • The elif Construct
  • A loop Example

Variables

  • User Created Variables
  • The read Command
  • The Shell Environment
  • The export Command
  • Sub-shells
  • Command Substitution
  • Quoting Mechanisms
  • Assigning Variables - Summary

Special Variables

  • Command Line Arguments
  • $- Number of Arguments
  • The shift Command
  • $* - All Arguments
  • $$ - PID of Shell

More Flow Control

  • The for Loop
  • The while Loop
  • The Case Construct

Advanced Shell Programming

  • Filename Generation
  • Parameters
  • Named Parameters
  • Positional Parameters
  • Special Parameters
  • Parameter Substitution
  • Here Documents
  • Shell Commands
  • Command List Separators
  • Control Flow - Conditionals
  • The case Construct
  • Control Flow - Loops
  • The trap Command

Appendix: Korn shell features

  • Viewing your Command History
  • Editing and Re-executing Commands
  • Aliases
 

Call Toll-free 877-245-6815 or 303-416-3056 to set up your IT Training today.