Beginning Shell Scripting

Covering all major platforms-Linux, Unix, Mac OS X, and Windows-this guide shows programmers and power users how to customize an operating system, automate commands, and simplify administration tasks using shell scriptsOffers complete shell-scripting instructions, robust code examples, and full scri...

Celý popis

Uloženo v:
Podrobná bibliografie
Hlavní autoři: Foster-Johnson, Eric, Welch, John C, Anderson, Micah
Médium: E-kniha
Jazyk:angličtina
Vydáno: Hoboken John Wiley & Sons, Incorporated 2005
Wrox
Wiley
Vydání:1
Edice:Programmer to programmer
Témata:
ISBN:0764583204, 9780764583209
On-line přístup:Získat plný text
Tagy: Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
Obsah:
  • Resolving Expressions -- Index
  • Intro -- Beginning Shell Scripting -- About the Authors -- Credits -- Contents -- Introduction -- Whom This Book Is For -- What Does This Book Cover? -- How This Book Is Structured -- What Do You Need to Use This Book? -- Conventions -- Errata -- p2p.wrox.com -- Chapter 1: Introducing Shells -- What Is a Shell? -- Why Use Shells? -- What Kind of Shells Are There? -- How Do Shells Fit into a Graphical Environment? -- Entering Commands -- Command Editing -- Working with Wildcards -- Running Commands in the Background -- Summary -- Chapter 2: Introducing Shell Scripts -- What Are Shell Scripts? -- Alternatives to Shells: Other Scripting Languages -- Tools to Edit Shell Scripts -- Writing Scripts -- Summary -- Exercises -- Chapter 3: Controlling How Scripts Run -- Referencing Variables -- Looping and Iteration -- Checking Conditions with if -- Nesting if Statements -- Testing with the test Command -- Making Complex Decisions with case -- Looping While a Condition Is True -- Looping Until a Condition Is True -- Summary -- Exercises -- Chapter 4: Interacting with the Environment -- Examining Environment Variables -- Customizing Your Account -- Handling Command-Line Arguments -- Making Scripts Executable -- Summary -- Exercises -- Chapter 5: Scripting with Files -- Combining Files into Archives -- Working with File Modes -- Testing Files with the test Command -- Dealing with Mac OS X Files -- HFS+ Versus UFS: The Mac OS X Holy War -- Working with Here Files and Interactive Programs -- Summary -- Exercises -- Chapter 6: Processing Text with sed -- Introducing sed -- sed Versions -- Installing sed -- How sed Works -- Selecting Lines to Operate On -- Substitution -- Advanced sed Invocation -- Advanced Addressing -- Advanced Substitution -- Hold Space -- More sed Resources -- Summary -- Exercises -- Chapter 7: Processing Text with awk
  • What Is awk (Gawk/Mawk/Nawk/Oawk)? -- How awk Works -- Invoking awk -- The print Command -- Using Variables in awk -- Control Statements -- Functions -- Resources -- Summary -- Exercises -- Chapter 8: Creating Command Pipelines -- Working with Standard Input and Output -- Piping Commands -- Summary -- Exercises -- Chapter 9: Controlling Processes -- Exploring Processes -- Launching Processes -- Capturing the Output of Processes -- Summary -- Exercises -- Chapter 10: Shell Scripting Functions -- Defining Functions -- Using Functions -- Using Arguments with Functions -- Using Return Codes with Functions -- Variable Scope: Think Globally, Act Locally -- Understanding Recursion -- Summary -- Exercises -- Chapter 11: Debugging Shell Scripts -- Deciphering Error Messages -- Tracking Down Problems with Debugging Techniques -- Running Scripts in Debugging Mode -- Avoiding Errors with Good Scripting -- Summary -- Exercises -- Chapter 12: Graphing Data with MRTG -- Working with MRTG -- Monitoring Other Data with MRTG -- Installing MRTG -- Writing Scripts for MRTG -- Configuring MRTG -- Running MRTG -- Monitoring Your Computer with MRTG -- Monitoring Networks with MRTG -- Monitoring Applications with MRTG -- Summary -- Exercises -- Chapter 13: Scripting for Administrators -- Why Write Scripts? -- Scripting Complicated Commands -- Troubleshooting Your Systems -- Removing Minor Annoyances -- Cleaning Up Data -- Automating Daily Work -- Summary -- Exercises -- Chapter 14: Scripting for the Desktop -- Scripting Office Applications -- Scripting for the Desktop on Mac OS X -- Scripting Multimedia -- Scripting Other Desktop Applications -- Where to Go from Here -- Summary -- Exercises -- Appendix A: Answers to Exercises -- Appendix B: Useful Commands -- Navigating the System -- Working with Files and Directories -- Manipulating Text -- Transforming Data