UNIX Shells by Example, 4/e (Paperback)

Ellie Quigley

  • 出版商: Prentice Hall
  • 出版日期: 2004-09-01
  • 售價: $2,050
  • 貴賓價: 9.5$1,948
  • 語言: 英文
  • 頁數: 1200
  • 裝訂: Paperback
  • ISBN: 013147572X
  • ISBN-13: 9780131475724
  • 立即出貨 (庫存 < 3)

買這商品的人也買了...

相關主題

商品描述

Description:

Quigley has thoroughly updated her classic with this fourth edition, which delivers the information today’s shell programmers need most–including comprehensive coverage of Linux shell programming with bash 2.05.  Drawing on 20 years’ experience as a shell programming instructor, Quigley guides the student through every facet of programming all leading Unix/Linux shells: bourne, bash, korn, C, and tcsh. Quigley illuminates each concept with up-to-date, classroom-tested code examples designed to help the student jump-start their projects. She also systematically introduces awk, sed, and grep for both UNIX and GNU/Linux.

 

 

Table of Contents:

Preface.

Acknowledgments.

1. Introduction to UNIX/Linux Shells.

    What Is UNIX? What Is Linux? A Little History.

    Definition and Function of a Shell.

    History of the Shell.

    System Startup and the Login Shell.

    Processes and the Shell.

    The Environment and Inheritance.

    Executing Commands from Scripts.

2. Shell Programming QuickStart.

    Taking a Peek at Shell Scripts.

    Sample Scripts: Comparing the Major Shells.

    The C and TC Shell Syntax and Constructs.

    The Bourne Shell Syntax and Constructs.

    The Korn Shell Constructs.

    The Bash Shell Constructs.

3. Regular Expressions and Pattern Matching.

    Regular Expressions.

    Combining Regular Expression Metacharacters.

4. The grep Family.

    The grep Command.

    grep Examples with Regular Expressions.

    grep with Options.

    grep with Pipes.

    egrep (Extended grep).

    fgrep (Fixed grep or Fast grep).

    Linux and GNU grep.

    GNU Basic grep (grep -G) with Regular Expressions.

    grep -E or egrep (GNU Extended grep).

    Fixed grep (grep -F and fgrep).

    Recursive grep (rgrep, grep -R).

    GNU grep with Options.

    grep with Options (UNIX and GNU).

    LAB 1: grep Exercise.

5. sed, the Streamlined Editor.

    What Is sed?

     Versions of sed.

    How Does sed Work?

    Regular Expressions.

    Addressing.

    Commands and Options.

    Error Messages and Exit Status.

    Metacharacters.

    sed Examples.

    sed Scripting.

    LAB 2: sed Exercise.

6. The awk Utility.

    What's awk? What's nawk? What's gawk?

    awk's Format.

    How awk Works.

    Formatting Output.

    awk Commands from Within a File.

    Records and Fields.

    Patterns and Actions.

    Regular Expressions.

    awk Commands in a Script File.

    Review.

    LAB 3: awk Exercise.

    Comparison Expressions.

    Review.

    LAB 4: awk Exercise.

    Variables.

    Redirection and Pipes.

    Pipes.

    Review.

    LAB 5: nawk Exercise.

    Conditional Statements.

    Loops.

    Program Control Statements.

    Arrays.

    awk Built-In Functions.

    Built-In Arithmetic Functions.

    User-Defined Functions (nawk).

    Review.

    LAB 6: nawk Exercise.

    Odds and Ends.

    LAB 7: nawk Exercise.

    awk Built-In Functions.

7. The Interactive Bourne Shell.

    Introduction.

    The Environment.

    The Command Line.

    Shell Metacharacters (Wildcards).

    Filename Substitution.

    Variables.

    Quoting.

    Command Substitution.

    An Introduction to Functions.

     Standard I/O and Redirection.

    Pipes.

    The here document and Input.

8. Programming the Bourne Shell.

    Introduction.

    Reading User Input.

    Arithmetic.

    Positional Parameters and Command-Line Arguments.

    Conditional Constructs and Flow Control.

    Looping Commands.

    Functions.

    Trapping Signals.

    The Command Line.

    Shell Invocation Options.

    LAB 8: Bourne Shell--Getting Started.

    LAB 9: Metacharacters.

    LAB 10: Redirection.

    LAB 11: First Script.

    LAB 12: Command-Line Arguments.

    LAB 13: Getting User Input.

    LAB 14: Conditional Statements.

    LAB 15: Conditionals and File Testing.

    LAB 16: The case Statement.

    LAB 17: Loops.

    LAB 18: Functions.

9. The Interactive C and TC Shells.

    Introduction.

    The Environment.

    The C/TC Shell Command Line.

    Aliases.

    Manipulating the Directory Stack.

    Job Control.

    Shell Metacharacters.

    Filename Substitution.

    Redirection and Pipes.

    Variables.

    Command Substitution.

    Quoting.

    New Features of the Interactive TC Shell.

    The TC Shell Command Line.

    TC Shell Command, Filename, and Variable Completion.

    TC Shell Spelling Correction.

    TC Shell Aliases.

    TC Shell Job Control.

    Printing the Values of Variables in the TC Shell.

    TC Shell Built-In Commands.

    Lab 19: The TC Shell--Getting Started.

    Lab 20: History.

    Lab 21: Shell Metacharacters.

    Lab 23: Variables and Arrays.

    Lab 22: Redirection.

10. Programming the C and TC Shells.

    Introduction.

    Reading User Input.

    Arithmetic.

    Debugging Scripts.

    Command-Line Arguments.

    Conditional Constructs and Flow Control.

    Looping Commands.

    Interrupt Handling.

    setuid Scripts.

    Storing Scripts.

    Built-In Commands.

    Lab 24: C/TC Shells--Getting Started.

    Lab 25: Shell Metacharacters.

    Lab 26: Redirection.

    Lab 27: First Script.

    Lab 28: Getting User Input.

    Lab 29: Command-Line Arguments.

    Lab 30: Conditionals and File Testing.

    Lab 31: The switch Statement.

    Lab 32: Loops.

11. The Interactive Korn Shell.

    Introduction.

    The Environment.

    The Command Line.

    Commenting and Filename Expansion.

    Aliases.

    Job Control.

    Metacharacters.

    Filename Substitution (Wildcards).

    Variables.

    Quoting.

    Command Substitution.

    Functions.

    Standard I/O and Redirection.

    Pipes.

    Timing Commands.

12. Programming the Korn Shell.

    Introduction.

    Reading User Input.

    Arithmetic.

    Positional Parameters and Command-Line Arguments.

    Conditional Constructs and Flow Control.

    Looping Commands.

    Arrays.

    Functions.

    Trapping Signals.

    Coprocesses.

    Debugging.

    The Command Line.

    Security.

    Built-In Commands.

    Korn Shell Invocation Arguments.

    Lab 33: Korn Shell--Getting Started.

    Lab 34: History.

     Lab 35: Aliases and Functions.

    Lab 36: Shell Metacharacters.

    Lab 37: Tilde Expansion, Quotes, and Command Substitution.

    Lab 38: Redirection.

    Lab 39: Job Control.

    Lab 40: Writing the info Shell Script.

    Lab 41: Variable Expansion of Substrings.

    Lab 42: The lookup Script.

    Lab 43: Using typeset.

    Lab 44: The if/else Construct and the let Command.

    Lab 45: The case Statement.

    Lab 46: The select Loop.

    Lab 47: Autoloading Functions.

13. The Interactive Bash Shell.

    Introduction.

    The Environment.

    The Command Line.

    Job Control.

    Command-Line Shortcuts.

    Aliases.

    Manipulating the Directory Stack.

    Metacharacters (Wildcards).

    Filename Substitution (Globbing).

    Variables.

    Quoting.

    Command Substitution.

    Arithmetic Expansion.

    Order of Expansion.

    Arrays.

    Functions.

    Standard I/O and Redirection.

    Pipes.

    Shell Invocation Options.

    Shell Built-In Commands.

    Lab 48: bash Shell--Getting Started.

    Lab 49: Job Control.

    Lab 50: Command Completion, History, and Aliases.

    Lab 51: Shell Metacharacters.

    Lab 52: Redirection.

    Lab 53: Variables.

14. Programming the Bash Shell.

    Introduction.

    Reading User Input.

    Arithmetic.

    Positional Parameters and Command-Line Arguments.

    Conditional Constructs and Flow Control.

    Looping Commands.

    Functions.

    Trapping Signals.

    Debugging.

    The Command Line.

    bash Options.

    Shell Built-In Commands.

    Lab 54: bash Shell--First Script.

    Lab 55: Command-Line Arguments.

    Lab 56: Getting User Input.

    Lab 57: Conditional Statements.

    Lab 58: Conditionals and File Testing.

    Lab 59: The case Statement.

    Lab 60: Loops.

    Lab 61: Functions.

15. Debugging Shell Scripts.

    Introduction.

    Style Issues.

    Types of Errors.

    Probable Causes for Syntax Errors.

    Tracing with Shell Options and the set Command.

    Summary.

16. The System Administrator and the Shell.

    Introduction.

    The Superuser.

    Becoming a Superuser with the su Command.

    Boot Scripts.

    Summary.

A. Useful UNIX/Linux Utilities for Shell Programmers.

B. Comparison of the Shells.

    The Shells Compared.

    tcsh versus csh.

    bash versus sh.

Index.

商品描述(中文翻譯)

描述:
Quigley在第四版中全面更新了她的經典著作,提供了現今的shell程式設計師最需要的資訊,包括對bash 2.05的Linux shell程式設計的全面涵蓋。Quigley以自己作為shell程式設計講師20年的經驗,引導學生進入所有主要的Unix/Linux shells的程式設計的各個方面,包括bourne、bash、korn、C和tcsh。Quigley通過最新的、經過課堂測試的代碼示例來闡明每個概念,旨在幫助學生快速啟動他們的項目。她還系統地介紹了awk、sed和grep在UNIX和GNU/Linux上的使用。

目錄:
前言。
致謝。
1. UNIX/Linux Shells簡介。
什麼是UNIX?什麼是Linux?一點歷史。
Shell的定義和功能。
Shell的歷史。
系統啟動和登錄Shell。
進程和Shell。
環境和繼承。
從腳本執行命令。
2. Shell程式設計快速入門。
查看Shell腳本。
示例腳本:比較主要的Shell。
C和TC Shell的語法和結構。
Bourne Shell的語法和結構。
Korn Shell的結構。
Bash Shell的結構。
3. 正則表達式和模式匹配。
正則表達式。
結合正則表達式元字符。
4. grep家族。
grep命令。