Thông tin tài liệu
www.it-ebooks.info
www.it-ebooks.info
www.it-ebooks.info
Table of Contents
Title Page
Copyright
Dedication
Credits
About the Authors
About the Technical Editor
Acknowledgments
Introduction
Who Should Read This Book
How This Book Is Organized
Minimum Requirements
Where to Go from Here
Part I: The Linux Command Line
Chapter 1: Starting with Linux Shells
What Is Linux?
Linux Distributions
Summary
Chapter 2: Getting to the Shell
Terminal Emulation
The terminfo Database
The Linux Console
The xterm Terminal
The Konsole Terminal
The GNOME Terminal
Summary
www.it-ebooks.info
Chapter 3: Basic bash Shell Commands
Starting the Shell
The Shell Prompt
The bash Manual
Filesystem Navigation
File and Directory Listing
File Handling
Directory Handling
Viewing File Contents
Summary
Chapter 4: More bash Shell Commands
Monitoring Programs
Monitoring Disk Space
Working with Data Files
Summary
Chapter 5: Using Linux Environment Variables
What Are Environment Variables?
Setting Environment Variables
Removing Environment Variables
Default Shell Environment Variables
Setting the PATH Environment Variable
Locating System Environment Variables
Variable Arrays
Using Command Aliases
Summary
Chapter 6: Understanding Linux File Permissions
Linux Security
Using Linux Groups
Decoding File Permissions
Changing Security Settings
Sharing Files
Summary
Chapter 7: Managing Filesystems
Exploring Linux Filesystems
Working with Filesystems
Logical Volume Managers
Summary
www.it-ebooks.info
Chapter 8: Installing Software
Package Management Primer
The Debian-Based Systems
The Red Hat–Based Systems
Installing from Source Code
Summary
Chapter 9: Working with Editors
The vim Editor
The emacs Editor
The KDE Family of Editors
The GNOME Editor
Summary
Part II: Shell Scripting Basics
Chapter 10: Basic Script Building
Using Multiple Commands
Creating a Script File
Displaying Messages
Using Variables
Redirecting Input and Output
Pipes
Performing Math
Exiting the Script
Summary
Chapter 11: Using Structured Commands
Working with the if-then Statement
The if-then-else Statement
Nesting ifs
The test Command
Compound Condition Testing
Advanced if-then Features
The case Command
Summary
Chapter 12: More Structured Commands
The for Command
The C-Style for Command
www.it-ebooks.info
The while Command
The until Command
Nesting Loops
Looping on File Data
Controlling the Loop
Processing the Output of a Loop
Summary
Chapter 13: Handling User Input
Command Line Parameters
Special Parameter Variables
Being Shifty
Working with Options
Standardizing Options
Getting User Input
Summary
Chapter 14: Presenting Data
Understanding Input and Output
Redirecting Output in Scripts
Redirecting Input in Scripts
Creating Your Own Redirection
Listing Open File Descriptors
Suppressing Command Output
Using Temporary Files
Logging Messages
Summary
Chapter 15: Script Control
Handling Signals
Running Scripts in Background Mode
Running Scripts Without a Console
Job Control
Being Nice
Running Like Clockwork
Summary
Part III: Advanced Shell Scripting
Chapter 16: Creating Functions
Basic Script Functions
www.it-ebooks.info
Returning a Value
Using Variables in Functions
Array Variables and Functions
Function Recursion
Creating a Library
Using Functions on the Command Line
Summary
Chapter 17: Writing Scripts for Graphical Desktops
Creating Text Menus
Doing Windows
Getting Graphic
Summary
Chapter 18: Introducing sed and gawk
Text Manipulation
The sed Editor Basics
Summary
Chapter 19: Regular Expressions
What Are Regular Expressions?
Defining BRE Patterns
Extended Regular Expressions
Regular Expressions in Action
Summary
Chapter 20: Advanced sed
Multiline Commands
The Hold Space
Negating a Command
Changing the Flow
Pattern Replacement
Using sed in Scripts
Creating sed Utilities
Summary
Chapter 21: Advanced gawk
Using Variables
Working with Arrays
Using Patterns
Structured Commands
www.it-ebooks.info
Formatted Printing
Built-in Functions
User-Defined Functions
Summary
Chapter 22: Working with Alternative Shells
What Is the dash Shell?
The dash Shell Features
Scripting in dash
The zsh Shell
Parts of the zsh Shell
Scripting with zsh
Summary
Part IV: Advanced Shell Scripting Topics
Chapter 23: Using a Database
The MySQL Database
The PostgreSQL Database
Working with Tables
Using the Database in Your Scripts
Summary
Chapter 24: Using the Web
The Lynx Program
The cURL Program
Networking with zsh
Summary
Chapter 25: Using E-mail
The Basics of Linux E-Mail
Setting Up Your Server
Sending a Message with Mailx
The Mutt Program
Summary
Chapter 26: Writing Script Utilities
Monitoring Disk Space
Performing Backups
Managing User Accounts
www.it-ebooks.info
Summary
Chapter 27: Advanced Shell Scripts
Monitoring System Statistics
Problem-Tracking Database
Summary
Appendix A: Quick Guide to bash Commands
Built-in Commands
bash Commands
Environment Variables
Appendix B: Quick Guide to sed and gawk
The sed Editor
The gawk Program
Index
www.it-ebooks.info
[...]... with Linux Shells In this Chapter What is Linux? Parts of the Linux kernel Exploring the Linux desktop Visiting Linux distributions Before you can dive into working with the Linux command line and shells, it's a good idea to first understand what Linux is, where it came from, and how it works This chapter walks you through what Linux is, and explains where the shell and command line fit in the overall Linux. .. Minimum Requirements Linux Command Line and Shell Scripting Bible doesn't focus on any specific Linux distribution, so you'll be able to follow along in the book using any Linux system you have available The bulk of the book references the bash shell, which is the default shell for most Linux systems Where to Go from Here Once you've completed Linux Command Line and Shell Scripting Bible, you'll be well... tutorials and real-world information, as well as reference and background information that provides a context for what you are learning This book is a fairly comprehensive resource on the Linux command line and shell commands By the time you have completed Linux Command Line and Shell Scripting Bible you will be well prepared to write your own shell scripts that can automate practically any task on your Linux. .. the Linux command line prompt and what to do once you get there Often performing simple tasks, such as file management, can be done more quickly from the command line than from a fancy graphical interface There's a wealth of commands you can use from the command line, and this book shows you how to use them How This Book Is Organized This book leads you through the basics of the Linux command line and. .. to access the shell (Chapter 2) Introducing the basic shell commands (Chapter 3) Using more advanced shell commands to peek at system information (Chapter 4) Working with shell variables to manipulate data (Chapter 5) Understanding the Linux filesystem and security (Chapter 6) Working with Linux filesystems from the command line (Chapter 7) Installing and updating software from the command line (Chapter... sites, such as Slashdot and Distrowatch, that provide up-to-the-minute information about new advances in Linux www.it-ebooks.info Part I The Linux Command Line In This Part Chapter 1: Starting with Linux Shells Chapter 2: Getting to the Shell Chapter 3: Basic bash Shell Commands Chapter 4: More bash Shell Commands Chapter 5: Using Linux Environment Variables Chapter 6: Understanding Linux File Permissions... Shell The GNU /Linux shell is a special interactive utility It provides a way for users to start programs, manage files on the filesystem, and manage processes running on the Linux system The core of the shell is the command prompt The command prompt is the interactive part of the shell It allows you to enter text commands, and then it interprets the commands and then executes them in the kernel The shell. .. files are called shell scripts Any command that you can execute from the command line can be placed in a shell script and run as a group of commands This provides great flexibility in creating utilities for commonly run commands, or processes that require several commands grouped together www.it-ebooks.info There are quite a few Linux shells available to use on a Linux system Different shells have different... published numerous Linux and open source books He has administered UNIX, Linux, Novell, and Microsoft servers, as well as helped design and maintain a 3,500 user network utilizing Cisco switches and routers He has used Linux servers and shell scripts to perform automated network monitoring, and has written shell scripts in most of the common Linux shell environments Rich is an online instructor for... opportunity for us, and for helping us out in our writing careers Christine would like to thank her husband, Timothy, for his encouragement, patience, and willingness to listen, even when he has no idea what she is talking about www.it-ebooks.info Introduction Welcome to the second edition of Linux Command Line and Shell Scripting Bible Like all books in the Bible series, you can expect to find both hands-on tutorials . The Linux Command Line Chapter 1: Starting with Linux Shells What Is Linux? Linux Distributions Summary Chapter 2: Getting to the Shell Terminal Emulation The terminfo Database The Linux. Command Summary Chapter 12: More Structured Commands The for Command The C-Style for Command www.it-ebooks.info The while Command The until Command Nesting Loops Looping on File Data Controlling. sed and gawk The sed Editor The gawk Program Index www.it-ebooks.info www.it-ebooks.info www.it-ebooks.info www.it-ebooks.info Linux ® Command Line and Shell Scripting Bible, Second Edition
Ngày đăng: 29/03/2014, 19:20
Xem thêm: Linux Command Line and Shell Scripting Bible 2nd edition potx, Linux Command Line and Shell Scripting Bible 2nd edition potx