Table of Contents for
Learning Linux Shell Scripting
Close
Version ebook
/
Retour
Learning Linux Shell Scripting
by Ganesh Sanjiv Naik
Published by Packt Publishing, 2015
Cover
Table of Contents
Learning Linux Shell Scripting
Learning Linux Shell Scripting
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
1. Getting Started and Working with Shell Scripting
Tasks done by shell
Working in shell
Learning basic Linux commands
Our first script – Hello World
Compiler and interpreter – difference in process
When not to use scripts
Various directories
Working more effectively with shell – basic commands
Working with permissions
Summary
2. Drilling Deep into Process Management, Job Control, and Automation
Monitoring processes using ps
Process management
Process monitoring tools – top, iostat, and vmstat
Understanding "at"
Understanding "crontab"
Summary
3. Using Text Processing and Filters in Your Scripts
IO redirection
Pattern matching with the vi editor
Pattern searching using grep
Summary
4. Working with Commands
Command substitution
Command separators
Logical operators
Pipes
Summary
5. Exploring Expressions and Variables
Working with environment variables
Working with read-only variables
Working with command line arguments (special variables, set and shift, getopt)
Understanding getopts
Understanding default parameters
Working with arrays
Summary
6. Neat Tricks with Shell Scripting
The here document and the << operator
The here string and the <<< operator
File handling
Debugging
Summary
7. Performing Arithmetic Operations in Shell Scripts
Using the let command for arithmetic
Using the expr command for arithmetic
Binary, octal, and hex arithmetic operations
A floating-point arithmetic
Summary
8. Automating Decision Making in Scripts
Understanding the test command
Conditional constructs – if else
Switching case
Implementing simple menus with select
Looping with the for command
Exiting from the current loop iteration with the continue command
Exiting from a loop with a break
Working with the do while loop
Using until
Piping the output of a loop to a Linux command
Running loops in the background
The IFS and loops
Summary
9. Working with Functions
Passing arguments or parameters to functions
Sharing the data by many functions
Declaring local variables in functions
Returning information from functions
Running functions in the background
Creating a library of functions
Summary
10. Using Advanced Functionality in Scripts
Using the trap command
Ignoring signals
Using traps in function
Running scripts or processes even if the user logs out
Creating dialog boxes with the dialog utility
Summary
11. System Startup and Customizing a Linux System
User initialization scripts
Summary
12. Pattern Matching and Regular Expressions with sed and awk
sed – noninteractive stream editor
Using awk
Summary
Index
Next
Next Chapter
Table of Contents
Next
Next Chapter
Table of Contents