≡ Menu

Book Review

Book Review Shell Script Pearls

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.

Book Review: Shell Script Pearls

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

FreeBSD is one of the fastest, secure and widely UNIX-like operating system. Some of the biggest internet sites on earth powered by FreeBSD like Yahoo. I've been using FreeBSD in production environments since 1998. People often ask me about FreeBSD books. So the main aim of this post is to document all free resources, books and recommended books.

List of Free FreeBSD books and Guides

Following books are available online in HTML or PDF format free of charge.

FreeBSD Handbook

This is the number 1 book from freebsd documentation team. This handbook covers the installation and day to day use of FreeBSD 5.5-RELEASE and FreeBSD 6.2-RELEASE. All new FreeBSD admin and users will find this book quite useful. It covers installation, introduction to FreeBSD, UNIX concepts, networking and many more topics. A must have for all FreeBSD users.

The Complete FreeBSD

Greg Lehey’s The Complete FreeBSD is ultimate book if you would like to learn FreeBSD on your home or business computer. It is an eminently practical guidebook that explains not only how to get a computer up and running with the FreeBSD operating system, but also how to turn it into a highly functional and secure server that can host large numbers of users and disks, support remote access, and provide web service, mail service, and other key parts of the Internet infrastructure.

Html Version (N/A) | Download tar ball/pdf version [size 5M ] | Author website

A Comprehensive Guide to FreeBSD

As name suggests it is an absolute beginners guide to FreeBSD os.This book is designed for the new user and new system administrator of FreeBSD. This was written to help those who have no real UNIX background easily get started using FreeBSD. No matter what application, whether as a desktop system, or installed as a Internet server, FreeBSD has the power and the flexibility required to meet even the most demanding situations.

Other online resources

  1. Frequently Asked Questions - for FreeBSD 4.X, 5.X, and 6.X
  2. The FreeBSD Diary - a collection of how-to guides for FreeBSD operating system.
  3. FreeBSD howtos - Documentation for FreeBSD on how to set up all kinds of services and daemons in easy step-by-step documents.
  4. FreeBSD Desktop Guide - An in-depth guide to getting started installing and using FreeBSD as a client (desktop) OS!
  5. FreeBSD articles - from FreeBSD project.
  6. BSD Guides - Lots of guides for FreeBSD, NetBSD, OpenBSD, & Mac OS X

Books from O'reilly and other publishers

Nothing beats well written books. Following are my personal recommendation:

  • Building an Internet Server with FreeBSD 6 : "Building an Internet Server with FreeBSD 6" is the ultimate resource on the installation and configuration of open source server software with FreeBSD 6. This book contains step-by-step guides on building some of the most popular and powerful server applications available. To name a few: Apache HTTP (webserver), Courier-IMAP (IMAP server), CUPS (print server), BIND (DNS server), MySQL (database server), Postfix (mail server), and more. This book is an essential resource for new and experienced users deploying Internet servers with FreeBSD.
  • Absolute BSD : Your guide to FreeBSD,the powerful, flexible, and cost-effective UNIX-based operating system. Includes coverage of installation, networking, add-on software, security, network services, system performance, kernel tweaking, file systems, SCSI & RAID configurations, SMP, upgrading, monitoring, crash debugging, BSD in the office, and emulating other OSs. Michael Lucas is a FreeBSD committer.
  • BSD Hacks : Looking for a unique set of practical tips, tricks, and tools for administrators and power users of BSD systems? From hacks to customize the user environment to networking, securing the system, and optimization, BSD Hacks takes a creative approach to saving time and accomplishing more with fewer resources. If you want more than the average BSD user--to explore and experiment, unearth shortcuts, create useful tools--this book is a must-have.
  • Mastering FreeBSD and OpenBSD Security : Mastering FreeBSD and OpenBSD Security is the only book currently on the market devoted completely to BSD security. Dozens of practical examples help administrators of all stripes select, configure, and deploy these operating systems. By describing security solutions for real-life scenarios, this convenient guide lets administrators push their server's security to the next level.

Hopefully, with these resources you will be able to master FreeBSD. If you know any other good resources or books, please add them in comments!

Book Review: Linux System Administration

Linux System Administration is a book for a seasoned Linux or UNIX administrator. The book attempts to describe day-to-day administration, maintenance and advanced issues commonly faced by Linux system administrator. Book covers wild verity of topics.
[click to continue…]

Download Asterisk: The Future of Telephony PDF book

Download Asterisk: The Future of Telephony PDF book

Asterisk is an open source Personal Branch Exchange (PBX) system.

Like any PBX, it allows a number of attached telephones to make calls to one another, and to connect to other telephone services including the public switched telephone network (PSTN). A PBX also allows things like automated attendant, to creates messages that say "Press 1 to talk to a operator" and so on ;)

The O'Reilly book, Asterisk: The Future of Telephony will walk you through the process of configuring your first Asterisk system. From the book introduction page:

Many organizations are drawn to Internet telephony's promise of cost savings, and its ability to move data, images, and voice traffic over the same connection. Asterisk, an open source system than runs on Linux (and *BSD), offers the best option. This guide covers installing, configuring, and integrating Asterisk with existing phone systems, without the need for additional hardware.

Asterisk's flexibility comes at a price, however: it's not a simple system to learn, and the documentation is lacking. Asterisk: The Future of Telephony solves that problem by offering a complete roadmap for installing, configuring, and integrating Asterisk with existing phone systems. Our guide walks you through a basic dial plan step by step, and gives you enough working knowledge to set up a simple but complete system.

Download link

This book is published under the Creative Commons license.

Download Asterisk: The Future of Telephony PDF book (size 4.4M). Or try local mirror.

Written by a leading developer and maintainer of the Linux kernel, Linux Kernel in a Nutshell is a comprehensive overview of kernel configuration and building, a critical task for Linux users and administrators.

No distribution can provide a Linux kernel that meets all users' needs. Computers big and small have special requirements that require reconfiguring and rebuilding the kernel. Whether you are trying to get sound, wireless support, and power management working on a laptop or incorporating enterprise features such as logical volume management on a large server, you can benefit from the insights in this book.

Linux Kernel in a Nutshell covers the entire range of kernel tasks, starting with downloading the source and making sure that the kernel is in sync with the versions of the tools you need. In addition to configuration and installation steps, the book offers reference material and discussions of related topics such as control of kernel options at runtime.

Download of the day: Linux Kernel in a Nutshell book

A key benefit of the book is a chapter on determining exactly what drivers are needed for your hardware. Also included are recipes that list what you need to do to accomplish a wide range of popular tasks.

If you want to know how to build, configure, and install a custom Linux kernel on your machine, buy this book. It is written by someone who spends every day building, configuring, and installing custom kernels as part of the development process of this fun, collaborative project called Linux.

I'm especially proud of the chapter on how to figure out how to configure a custom kernel based on the hardware running on your machine. This is an essential task for anyone wanting to wring out the best possible speed and control of your hardware.

Download PDF Book

=> Free PDF Download Link (3 MB)

If you are serious about Linux security, you should have this book.

Free software magazine has published review of this book:
Security is one of the important reasons GNU/Linux is chosen over MS Windows. Many folks will claim that GNU/Linux just isn’t targeted as often. Could be—but it could also be that it isn’t targeted as often due to its design. SELinux takes this concept one step further. Not just satisfied with the inherent security, SELinux has been developed by a team of concerned professionals and is now included by default in the 2.6 kernel. Yes, you may have SELinux already and didn’t even know it.

There is a lot of information packed into these 456 pages. Not very many screenshots, but that wouldn’t really be appropriate anyway. Most of the examples are text files and they are displayed quite clearly. The command line instructions typically include the results you should expect from execution. This is as helpful as the instructions themselves and is done properly throughout the book.

Read rest of Brian' Book review...

Grokking the GIMP – download free book

Grokking the GIMP book

GIMP an image manipulation and paint program for Linux / UNIX. The GNU Image Manipulation Program (GIMP), is a raster graphics editor application with some support for vector graphics.

GIMP can also be used as a paint program. It features a set of drawing and painting tools such as airbrush, clone, pencil, and paint brush. Painting and drawing tools can be applied to an image with a variety of paint modes. It also offers an extensive array of selection tools like rectangle, ellipse, fuzzy select, Bezier select, intelligent scissors, and select by color.

GIMP offers a variety of plugins that perform a variety of image manipulations. Examples include bumpmap, edge detect, gaussian blur, and many others. In addition, GIMP has several scripting extension which allow for advanced non-interactive processing and creation of images.

This is a free book (tar ball version). The author illustrates the use of the Gimp with clear diagrams, easy to follow descriptions, and excellent set of examples of the Gimp's functionality are provided. This books goes very well with official Gimp documentation :)

You can also purchase this book for reading offline.