UNIX Shells by Example, 4/e (Paperback)
暫譯: UNIX Shell 範例解析 (第4版)

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 程式設計師最需要的信息,包括對 Linux shell 程式設計的全面覆蓋,使用 bash 2.05。Quigley 擁有 20 年的 shell 程式設計教學經驗,指導學生了解所有主要 Unix/Linux shell 的每個面向:bourne、bash、korn、C 和 tcsh。Quigley 用最新的、經過課堂測試的程式碼範例來闡明每個概念,旨在幫助學生快速啟動他們的專案。她還系統地介紹了 awk、sed 和 grep,適用於 UNIX 和 GNU/Linux。

目錄:
前言
致謝
1. UNIX/Linux Shell 簡介
- UNIX 是什麼?Linux 是什麼?簡史。
- Shell 的定義和功能。
- Shell 的歷史。
- 系統啟動和登入 shell。
- 進程與 shell。
- 環境與繼承。
- 從腳本執行命令。
2. Shell 程式設計快速入門
- 瞥見 Shell 腳本。
- 範例腳本:比較主要的 shell。
- C 和 TC Shell 語法與結構。
- Bourne Shell 語法與結構。
- Korn Shell 結構。
- Bash Shell 結構。
3. 正則表達式與模式匹配
- 正則表達式。
- 組合正則表達式元字符。
4. grep 家族
- grep 命令。
- 使用正則表達式的 grep 範例。
- 帶選項的 grep。
- 使用管道的 grep。
- egrep(擴展 grep)。
- fgrep(固定 grep 或快速 grep)。
- Linux 和 GNU grep。
- GNU 基本 grep(grep -G)與正則表達式。
- grep -E 或 egrep(GNU 擴展 grep)。
- 固定 grep(grep -F 和 fgrep)。
- 遞歸 grep(rgrep,grep -R)。
- 帶選項的 GNU grep。
- 帶選項的 grep(UNIX 和 GNU)。
- 實驗 1:grep 練習。
5. sed,流編輯器
- sed 是什麼?
- sed 的版本。
- sed 如何工作?
- 正則表達式。
- 定址。
- 命令和選項。
- 錯誤消息和退出狀態。
- 元字符。
- sed 範例。
- sed 腳本。
- 實驗 2:sed 練習。
6. awk 工具
- awk 是什麼?nawk 是什麼?gawk 是什麼?
- awk 的格式。
- awk 如何工作。
- 格式化輸出。
- 從文件中的 awk 命令。
- 記錄和字段。
- 模式和動作。
- 正則表達式。
- 腳本文件中的 awk 命令。
- 回顧。
- 實驗 3:awk 練習。
- 比較表達式。
- 回顧。
- 實驗 4:awk 練習。
- 變數。
- 重定向和管道。
- 管道。
- 回顧。
- 實驗 5:nawk 練習。
- 條件語句。
- 循環。
- 程式控制語句。
- 陣列。
- awk 內建函數。
- 內建算術函數。
- 使用者定義函數(nawk)。
- 回顧。
- 實驗 6:nawk 練習。
- 雜項。
- 實驗 7:nawk 練習。
- awk 內建函數。
7. 互動式 Bourne Shell
- 簡介。
- 環境。
- 命令行。
- Shell 元字符(通配符)。
- 文件名替換。
- 變數。
- 引號。
- 命令替換。
- 函數簡介。
- 標準 I/O 和重定向。
- 管道。
- here 文檔和輸入。