Table of Contents for
Linux Shell Scripting Bootcamp
Close
Version ebook
/
Retour
Linux Shell Scripting Bootcamp
by James Kent Lewis
Published by Packt Publishing, 2017
Cover
Table of Contents
Linux Shell Scripting Bootcamp
Linux Shell Scripting Bootcamp
Credits
About the Author
Acknowledgement
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
1. Getting Started with Shell Scripting
Demonstrating the use of scripts
Summary
2. Working with Variables
Validating parameters using conditional statements
Comparison operators for strings
Environment variables
Summary
3. Using Loops and the sleep Command
Screen manipulation
Indenting your code
Using the for statement
Leaving a loop early
The sleep command
Watching a process
Creating numbered backup files
Summary
4. Creating and Calling Subroutines
File redirection
Command piping
Subroutines
Using parameters
Making a current backup of your work
Summary
5. Creating Interactive Scripts
Summary
6. Automating Tasks with Scripts
Summary
7. Working with Files
Reading files
Reading and writing files
Reading and writing files interactively
File checksums
File encryption
Summary
8. Working with wget and curl
wget and recursion
wget options
curl
Summary
9. Debugging Scripts
Automatic backups
More syntax errors
Logic errors
Using set to debug scripts
Summary
10. Scripting Best Practices
ssh and scp
Find and use a good text editor
Environment variables and aliases
ssh prompt
Testing an archive
Progress indicator
Creating new commands from a template
Alerting the user
Summary
Index
Prev
Previous Chapter
Cover
Next
Next Chapter
Linux Shell Scripting Bootcamp
Table of Contents
Linux Shell Scripting Bootcamp
Credits
About the Author
Acknowledgement
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Customer Feedback
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Shell Scripting
Getting started
Using a good text editor
Demonstrating the use of scripts
Chapter 1 - Script 1
Chapter 1 - Script 2
Chapter 1 - Script 3
Chapter 1 - Script 4
Chapter 1 - Script 5
Chapter 1 - Script 6
Summary
2. Working with Variables
Using variables in scripts
Chapter 2 - Script 1
Validating parameters using conditional statements
Chapter 2 - Script 2
Comparison operators for strings
Chapter 2 - Script 3
Chapter 2 - Script 4
Chapter 2 - Script 5
Environment variables
Chapter 2 - Script 6
Chapter 2 - Script 7
Summary
3. Using Loops and the sleep Command
Using loops
Chapter 3 - Script 1
Chapter 3 - Script 2
Chapter 3 - Script 3
Screen manipulation
Chapter 3 - Script 4
Chapter 3 - Script 5
Indenting your code
Chapter 3 - Script 6
Using the for statement
Chapter 3 - Script 7
Chapter 3 - Script 8
Leaving a loop early
Chapter 3 - Script 9
The sleep command
Chapter 3 - Script 10
Chapter 3 - Script 11
Watching a process
Chapter 3 - Script 12
Creating numbered backup files
Chapter 3 – Script 13
Summary
4. Creating and Calling Subroutines
Clearing the screen
Chapter 4 - Script 1
File redirection
Command piping
Chapter 4 - Script 2
Chapter 4 - Script 3
Subroutines
Chapter 4 - Script 4
Using parameters
Chapter 4 - Script 5
Chapter 4 - Script 6
Making a current backup of your work
Chapter 4 – Script 7
Summary
5. Creating Interactive Scripts
Chapter 5 - Script 1
Chapter 5 - Script 2
Chapter 5 - Script 3
Chapter 5 - Script 4
Chapter 5 - Script 5
Chapter 5 - Script 6
Chapter 5 - Script 7
Chapter 5 - Script 8
Summary
6. Automating Tasks with Scripts
Chapter 6 - Script 1
Chapter 6 - Script 2
Chapter 6 - Script 3
Chapter 6 - Script 4
Cron
Chapter 6 - Script 5
Chapter 6 - Script 6
Chapter 6 - Script 7
Summary
7. Working with Files
Writing files
Chapter 7 - Script 1
Reading files
Chapter 7 - Script 2
Chapter 7 - Script 3
Chapter 7 - Script 4
Reading and writing files
Chapter 7 - Script 5
Reading and writing files interactively
Chapter 7 - Script 6
File checksums
File encryption
Chapter 7 - Script 7
Summary
8. Working with wget and curl
Introducing the wget program
wget options
wget return codes
wget configuration files
Chapter 8 - Script 1
wget and recursion
wget options
curl
curl options
Chapter 8 - Script 2
Summary
9. Debugging Scripts
Syntax errors
Chapter 9 - Script 1
Chapter 9 - Script 2
Automatic backups
More syntax errors
Chapter 9 - Script 3
Logic errors
Chapter 9 - Script 4
Using set to debug scripts
Chapter 9 - Script 5 and Script 6
Chapter 9 - Script 7
Chapter 9 - Script 8
Chapter 9 - Script 9
Summary
10. Scripting Best Practices
Verifying backups
ssh and scp
Find and use a good text editor
Environment variables and aliases
ssh prompt
Testing an archive
Progress indicator
Chapter 10 - Script 1
Creating new commands from a template
Chapter 10 – Script 2
Alerting the user
Chapter 10 – Script 3
Summary
Index
Prev
Previous Chapter
Cover
Next
Next Chapter
Linux Shell Scripting Bootcamp