Chapter 7 Study Guide: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
(Created page with "==Command input and output== ==Shell variables== ==Shell Scripts== ==Escape Sequences==")
 
Line 1: Line 1:
==Command input and output==
==Command input and output==
'''Bash Shell'''
Responsible for providing user interface
Interprets commands entered on command line
Can manipulate command input and output
'''Input and Outputs of commands'''
Represented by labels know as file descriptors. There are 3 file descriptors:
'''Standard input''' (stdin) information processed by the command during execution
'''Standard output''' (stdout) refers to the normal output of a command
'''Standard error''' (stderr) refers to any error messages generated by the command
Both stdout and stderr are displayed on the terminal screen by default
Use the BASH shell to redirect stdout and stderr from the terminal screen to a file on filesystem
Use the > shell metacharacter followed by absolute or relative pathname of the file
ls /etc/hosts /etc/h 1>goodoutput
Use the < to redirect a file to the stdin
cat </etc/issue
==Shell variables==
==Shell variables==
==Shell Scripts==
==Shell Scripts==
==Escape Sequences==
==Escape Sequences==

Revision as of 21:17, 29 February 2012

Command input and output

Bash Shell Responsible for providing user interface

Interprets commands entered on command line

Can manipulate command input and output

Input and Outputs of commands Represented by labels know as file descriptors. There are 3 file descriptors:


Standard input (stdin) information processed by the command during execution

Standard output (stdout) refers to the normal output of a command

Standard error (stderr) refers to any error messages generated by the command

Both stdout and stderr are displayed on the terminal screen by default


Use the BASH shell to redirect stdout and stderr from the terminal screen to a file on filesystem

Use the > shell metacharacter followed by absolute or relative pathname of the file

ls /etc/hosts /etc/h 1>goodoutput

Use the < to redirect a file to the stdin

cat </etc/issue

Shell variables

Shell Scripts

Escape Sequences