Linux+ Guide to Linux Certification, Second Edition Chapter 8 Working with the BASH Shell.

  • Published on
    20-Dec-2015

  • View
    215

  • Download
    0

Embed Size (px)

Transcript

  • Slide 1
  • Linux+ Guide to Linux Certification, Second Edition Chapter 8 Working with the BASH Shell
  • Slide 2
  • Linux+ Guide to Linux Certification, 2e2 Objectives Redirect the input and output of a command Identify and manipulate common shell environment variables Create and export new shell variables Edit environment files to create variables upon shell startup
  • Slide 3
  • Linux+ Guide to Linux Certification, 2e3 Objectives (continued) Describe the purpose and nature of shell scripts Create and execute basic shell scripts Effectively use common decision constructs in shell scripts
  • Slide 4
  • Linux+ Guide to Linux Certification, 2e4 Command Input and Output BASH shell responsible for: Providing user interface Interpreting commands Manipulating command input and output Provided user specifies certain shell metacharacters with command File descriptors: Numeric labels that define command input and command output
  • Slide 5
  • Linux+ Guide to Linux Certification, 2e5 Command Input and Output (continued) Standard Input (stdin): File descriptor representing command input Standard Output (stdout): File descriptor representing command output Standard Error (stderror): File descriptor representing command error messages
  • Slide 6
  • Linux+ Guide to Linux Certification, 2e6 Command Input and Output (continued) Figure 8-1: The three common file descriptors
  • Slide 7
  • Linux+ Guide to Linux Certification, 2e7 Redirection Redirect stdout and stderr from terminal screen to a file Use > shell metacharacter Can redirect stdout and stderr to separate files Use separate filenames for stdout and stderr
  • Slide 8
  • Linux+ Guide to Linux Certification, 2e8 Redirection (continued) Redirecting stdin to a file: Use

Recommended

View more >