Shell Script Pearls is designed to provide information about shell scripting. The book is collection with all tips and code sample you need to learn about shell scripting. Author has clearly demonstrated unique tools and script samples that go beyond the level of basic scripting. The book is useful for geeks, hackers, sys admin and advanced users. The book doesnâ€™t explain basic programming structure and syntax. If you are the beginner get some basic book or start with our own tutorial.
You will find lots of useful collection of a shell scripts and practical examples that can be used in day today life.
Chapter 1: Shell script Debugging – You learn about manual and automated shell scripting debug techniques.
Chapter 2: Standard Functions Library – You will learn how to create a library for common task.
Chapter 3: Date and time Manipulation – Many administrative tasks such as backup heavily depends upon date and time. This chapter explains date and time calculations.
Chapter 4: Comparison and tests – Learn how to write and use the comparison and test using conditional statements and loops.
Chapter 5: Accepting Command Line Options and Parameters – Learn how to pass optional parameters to you script to provide more customization.
Chapter 6: Testing Variables and Assigning Defaults â€“ Learn about setting default variables or input parameters for a script. This will help you write customized and configurable shell script.
Chapter 7: Indirect Reference Variables – Learn how create indirect variable names (ability to generate variable names on fly)
Chapter 8: Shell process tree – You will learn about creating a shell process tree script for the currently running or all process.
Chapter 9: Data Redirection – If you get confused with output redirection or I/O redirection, this chapter provides the better understanding about redirection.
Chapter 10: Piping Input to read – Learn about pipes and related gotcha that came across while writing a portable script.
Chapter 11: Math from the shell – Learn how to use expr, bc and other tools to perform mathematical calculations from a shell.
Chapter 12: Cron – Learn how to create complex cron jobs and schedule jobs.
Chapter 13: Self-Linked Scripts – This is one my favorite technique â€“ for example a shell script called backup can be called in several different names to make a backup to ftp server, tape or another server.
Chapter 14: Throttling Parallel Processes – Learn how to run a shell script more efficiently in large multi-user environments.
Chapter 15: Command Line Editing and History – Learn how to set various command line editing mode to save time.
Chapter 16: Scripting from the command line – Learn how to write quick and dirty one liners from a command prompt.
Chapter 17: Automating User Input with expect – Learn how to provide password / username and other parameters using expect tool.
Chapter 18: User Input Timeout – Learn how to write more advanced scripts. If the user doesnâ€™t provide input in a specified time the script should continue running with a default input.
Chapter 19: Instant keyboard Response â€“ Learn how to write a key press detection shell script. For example detect keys pressed by end user and take an action.
Chapter 20: Directory Copying – Learn how to copy all sort of files using various tools.
Chapter 21 and 22: A brief tour of the X Display environment â€“ Learn basic usage of X windows system.
Chapter 23: Command line email attachments â€“ Learn how to send emails from a command line.
Chapter 24: Text processing one â€“ liners: Learn basic usage of common tools such as awk, expr, sed and many others.
Chapter 25: Editing Files in Place â€“ Learn how to use ed to edit text file and perform search and replace operations.
Chapter 26 to 42 provides advanced code examples and techniques such as:
- Reading variables from a flat text file
- Automating ftp task
- Automating email with procmail
- Automating RCS
- Writing a process management
- Running process from inittab file
- Password aging notification
- System snapshots
- Rotating log files etc
You will find shell man pages difficult to use and w/ examples. Ron has done good job explaining and providing valuable shell script code. You can use samples in your own projects. I recommend this book for every Linux / UNIX geek and System Administrator.
- Book title: Shell Script Pearls (Paperback)
- Author: Ron Peters
- Publisher: 16 Ton Press
- Pub Date: 11-May-2007
- ISBN 10:0615141056
- Pages: 320
- Level of experience needed: Intermediate Linux / UNIX sys admin
- Who will find useful: Linux/UNIX sys admin / Geeks
- Additional goodies included (such as CDROM) …? : No
- Ratings : 4/5
- Purchase online @ Amazon
🐧 0 comments... add one ↓
|Category||List of Unix and Linux commands|
|Disk space analyzers||df • ncdu • pydf|
|File Management||cat • cp • mkdir • tree|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||NetHogs • dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|