Become a fan of Slashdot on Facebook


Forgot your password?

Book Review: A Practical Guide To Linux Commands, Editors, and Shell Programming 81

Rambo Tribble writes "This new, third edition of Sobell's book brings enhancements that add to the text's value as both a learning tool and a reference. This has always been a foundation book for those wanting a professional level of familiarity with Linux. The addition of chapters to introduce the Python language and MySQL database serves to offer the reader practical insights into additional Linux-related technologies." Read below for the rest of Rambo's review.
A Practical Guide to Linux Commands, Editors, and Shell Programming (3rd Edition)
author Mark G. Sobell
pages 1200 pages
publisher Prentice Hall
rating 9/10
reviewer Rambo Tribble
ISBN 978-0-13-308504-4
summary A concise, definitive guide for learning to manage Linux through the command line
As the title suggests, this is a book about the Linux command line; GUI desktops are barely mentioned. This makes the text's primary audience computer professionals. As *nix professionals know, the command line not only offers quicker, more precise control of the system and its software, but is also far more portable across platforms. This is what allowed Sobell to extend his purview to encompass Mac OS X, in the second edition.

To be clear, this is not a volume to be taken lightly. It is a dense read, but is clearly written with concise and direct examples. In other words, it takes some concentration and effort to work through this book, but that effort is rewarded with a clear payoff of knowledge.

Sobell starts off by offering a basic introduction to Linux, exploring the roots of Unix and the evolution of Linux to become the mature and capable operating system it is today. Along the way, he delineates the aspects of the OS which define its character and form the basis of its appeal.

Next, he dives straight in to the particulars of running Linux from the command line. First, he outlines the CL environment and how to use it effectively. He is careful to point out the potential "gotchas" that can plague the uninformed neophyte. From there, he moves directly into the core commands, then the Linux filesystem and the shell environment. These subjects are at the heart of Linux system administration and while Sobell's treatment of them is necessarily brief, it is relevant and meaty.

In the book's second part, Sobell offers introductions to the most common editors to be found on Linux installations, vim and emacs. With a basic familiarity of how to edit text files, the reader is prepared to move into shell scripting, a powerful tool in controlling Linux and its suite of utilities and applications.

After a quick tour of shell environments, the author plunges into the common programming/scripting tools found on Linux, shell scripts, Perl, and Python. Once again, Sobell is obliged to brevity, but again he manages to provide a cohesive foundation that enables the reader to gain a good fundamental grasp of the subject, and a solid springboard for further learning.

The new chapter on Python introduces this cross-platform programming language, which enjoys growing popularity as a front-end development tool for Linux. Leveraging GUI toolkits, such as Qt or GTK+ , Python is considered by many to be the most effective choice for user-interface programming. The language is also commonly used in web server scripting. The Python coverage adds to Sobell's insightful treatment of the shell, shell scripts and editors already set forth in the volume.

The other new addition is a chapter on MySQL. MySQL has long enjoyed popularity as the "go to" database manager on Linux. Perhaps best known for being the "M" in "LAMP" web server setups, it is also commonly used as the back end for GUI programs, such as MythTV.

The coverage of programming tools wraps up with chapters on AWK, the pattern processing language, and sed, the stream editor. These essential tools of the command line provide useful data filtering and manipulation facilities.

The next section of the book is devoted to utilities providing secure network functions. OpenSSH and rsync are each given chapters which explore their capabilities in file management and secure communication use.

The command reference portion of the volume follows. Although it provides much the same information as the venerable on-line manual pages, it does so in a consistent voice with better illustrations and clear examples, something man pages are notoriously spotty on. Indeed, having Sobell's clear explanations, to compare, can be a great help in learning to interpret the often terse and sometimes arcane documentation the man pages provide.

Of course, 1150 pages, over a quarter of which is reference, doesn't leave time to repeat things or dwell in depth on any one topic. Sobell is often constrained to pages for subjects upon which numerous whole books have been written. With remarkable facility, however, he manages to clearly and directly convey the crux elements of each topic he addresses. This provides the reader with a broad and functional foundation in the basic elements of Linux/OS X system administration.

Bottom line: If you only get one book on the Linux command line and its tools, this should be it.

You can purchase A Practical Guide to Linux Commands, Editors, and Shell Programming (3rd Edition) from Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.


This discussion has been archived. No new comments can be posted.

Book Review: A Practical Guide To Linux Commands, Editors, and Shell Programming

Comments Filter:
  • Thanks for reviewing this book, which appears to have been published in early Fall of last year. Since it's a book on the commands, editors, and shell programming, it'll probably be valid for years to come. (I've had college instructors require students to purchase texts that were "only" four years old, but already severely outdated by that point.)
  • great (Score:4, Informative)

    by 101percent ( 589072 ) on Monday March 25, 2013 @03:27PM (#43274813)
    This book is great. My school used the previous edition for intro to Linux. It's a great distro-agnostic reference.
  • Review? (Score:0, Informative)

    by Anonymous Coward on Monday March 25, 2013 @03:27PM (#43274817)

    This is not a book review; it's a summary. "You should buy it" does not make this a review. There is nothing here that I could not have found looking at the TOC on Amazon.

  • expect (Score:4, Informative)

    by udachny ( 2454394 ) on Monday March 25, 2013 @03:30PM (#43274863) Journal

    Users should be aware of another tool that can be used under GNU/Linux, it's called 'expect'. While normal shell programming is extremely useful and powerful, 'expect' provides a mechanism to 'talk' to interactive programs while running a shell script. 'expect' will actually expect certain known points of interaction from an interactive command line program and will provide it with input as if a user typed it by hand.

    It's useful for example to code update procedures with expect if you have more than one machine to administer and you have to update something on the machine, maybe update a package or two, run some database commands, do it all from your machine over ssh without having scripts installed on the machines on the other side, things like that.

  • by Dagger2 ( 1177377 ) on Monday March 25, 2013 @03:40PM (#43274963)

    Debian will do this too if you manually create a "CAL" symlink and call that instead of `cal`, so I delved into the source for its Debian packge.

    The code responsible is here []. It prints in the horizontal format if you call the program as "cal" (case-sensitive), and in the vertical format otherwise. I have no idea why it does this (the git repository only goes back to 2009, and I bet this code has been around for a lot longer than that), but there it is. On my Debian system, the program is installed as `ncal`, with `cal` being a symlink to `ncal`, so perhaps the vertical mode is the intended format and the horizontal mode is for backwards compatibility with a previous `cal` tool?

    OS X systems are case-insensitive by default, so your attempt at using `CAL` ended up running ncal via the `cal` symlink, but the check for calling name is case-sensitive, so the horizontal mode isn't triggered.

  • by hawguy ( 1600213 ) on Monday March 25, 2013 @04:37PM (#43275537)

    Sounds like your CAL somehow redirects in some cases to ncal - probably a bug in the filesystem.

    It's so hard to tell if someone is trolling by making a backhanded swipe at a "feature" of OSX, or if they really mean what they say.

    By default, HFS on OSX is case-insensitive (but is case preserving). So cal, Cal, and cAL all refer to the same program. It's not a bug.

  • by jones_supa ( 887896 ) on Monday March 25, 2013 @05:12PM (#43275929)
    The "cal" program checks if it has been called exactly with the lower-case command "cal" and displays the horizontal format. Otherwise it displays the vertical format. The reason why the other commands such as "CAL" work are due to the case-insensitive filesystem in Mac.

To avoid criticism, do nothing, say nothing, be nothing. -- Elbert Hubbard