2012年8月23日木曜日

Learning the bash

Ch. 1 bash Basics

Ch. 2 Command-Line Editing
  • emacs, vi editer
  • 2.2. The History List
  • emacs Editing Mode
  • vi Editing Mode
  • The fc Command
    fc is a built-in shell command that provides a superset of the C shell history mechanism. You can use it to examine the most recent commands you entered, to edit one or more commands with your favorite "real" editor, and to run old commands with changes without having to type the entire command in again.
Ch. 3 Customizing Your Environment
  • Special files: .bash_profile, .bash_logout, and bashrc
  • Aliases:
    aliase name='command'
    aliase search=grep
    aliase cdvoy='cd sipp/demo/animation/voyager'

    * just alias show all aliases
    *unalias remove alias
    Aliases are very handy for creating a comfortable environment, but they have essentially been superseded by shell scripts and functions, which we will look at in the next chapter. These give you everything aliases do plus much more, so if you become proficient at them, you may find that you don't need aliases anymore. However, aliases are ideal for novices who find UNIX to be a rather forbidding place, full of terseness and devoid of good mnemonics. Chapter 4 shows the order of precedence when, for example, an alias and a function have the same name. 
  • Options:
    shopt -o :
  • Variables: Shell variables are characteristics which cannot be expressed as an on/off choise.
    varname=value
    • 3.4. built-in variables
      HISTCMD
      HISTFILESIZE
      HISTSIZE
    • 3.4.2.2. Mail variables
      Since the mail program is not running all the time, there is no way for it to inform you when you get new mail; therefore the shell does this instead.
    • 3.4.2.3 Prompting variables
      PS1, PS2, PS3, PS4
    • 3.4.2.4 Command search path

Ch. 4 Basic shell Programming
  • Shell Scripts and Shell Functions

Ch. 5 Flow Control
Ch. 6 Command-Line Options and Typed Variables
Ch. 7 Input/Output and Command-Line Processing
Ch. 8 Process Handling
Ch. 9 Debugging Shell Programs
Ch. 10 bash Administration
Ch. 11 Shell Scripting
Ch. 12 bash for Your System

Appx. A. Related Shells
Appx. B. Reference Lists
Appx. C. Loadable Built-Ins
Appx. D. Programmable Completion

0 件のコメント:

コメントを投稿