Classic Shell Scripting
Hidden Commands that Unlock the Power of Unix
Publisher: O'Reilly Media
Released: May 2005
Pages: 560

Shell scripting skills never go out of style. It's the shell that unlocks the real potential of Unix. Shell scripting is essential for Unix users and system administrators-a way to quickly harness and customize the full power of any Unix system. With shell scripts, you can combine the fundamental Unix text and file processing commands to crunch data and automate repetitive tasks. But beneath this simple promise lies a treacherous ocean of variations in Unix commands and standards. Classic Shell Scripting is written to help you reliably navigate these tricky waters.

Writing shell scripts requires more than just a knowledge of the shell language, it also requires familiarity with the individual Unix programs: why each one is there, how to use them by themselves, and in combination with the other programs. The authors are intimately familiar with the tips and tricks that can be used to create excellent scripts, as well as the traps that can make your best effort a bad shell script. With Classic Shell Scripting you'll avoid hours of wasted effort. You'll learn not only write useful shell scripts, but how to do it properly and portably.

The ability to program and customize the shell quickly, reliably, and portably to get the best out of any individual system is an important skill for anyone operating and maintaining Unix or Linux systems. Classic Shell Scripting gives you everything you need to master these essential skills.

Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyClassic Shell Scripting
 
3.6

(based on 11 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (7)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (2)

100%

of respondents would recommend this to a friend.

Pros

  • Helpful examples (3)

Cons

    Best Uses

    • Intermediate (3)
    • Novice (3)

    Reviewed by 11 customers

    Sort by

    Displaying reviews 1-10

    Back to top

    Previous | Next »

     
    4.0

    A great reference to have on hand.

    By Rick

    from Ontario, Canada

    About Me Sys Admin

    Verified Buyer

    Pros

    • Helpful examples

    Cons

      Best Uses

      • Intermediate
      • Novice
      • Student

      Comments about oreilly Classic Shell Scripting:

      I started shell scripting years ago and wanted to get back into it. With this book I was easily able to find the things that I couldn't quite remember how to do.
      This is an excellent book to have on hand whether your are starting out with your first shell script or just getting back into.

      (3 of 3 customers found this review helpful)

       
      4.0

      A wonderful book.

      By Arthur Alves

      from Alagoas, Brazil

      About Me Developer, Sys Admin

      Verified Reviewer

      Pros

      • Accurate
      • Concise
      • Easy to understand
      • Helpful examples
      • Well-written

      Cons

        Best Uses

        • Expert
        • Intermediate
        • Novice
        • Student

        Comments about oreilly Classic Shell Scripting:

        Having heard many good things about the books by Arnold Robbins, on a rainy day of winter (Jul 2011) in college I found some chapters of this book in the "Linux System Administration" course and after having read them I began to wonder "why?"

        "Why only a few chapters and not the whole book?"

        I bought the ebook version and I saw with my own eyes how pleasant it's to read a book by Arnold Robbins.
        A book aimed for those who have some basic experience in Shell, those who are Unix System Administrators or Scripters with years of experience in the Unix command line.

        Arnold Robbins and Nelson H. F. Beebe say not only how the shell works, the useful commands, but also how to do it in the shell's way. I don't know about you, but I saw programmers doing some shell scripts as if they were programming in Java or C/C++, people who can't know how to use the power of shell. Because that this book is important for a novice and those who have experience too.

        Another thing that impressed me was seeing so much about regular expressions that will surely show some concepts for novices in this good explanations way. (For more about regular expressions: Learning Regular Expressions, 1st Edition by Michael Fitzgerald – Upcoming… I'm waiting to read it).

        I waited more about the "Chapter 15. Secure Shell Scripts: Getting Started" that how their name show us, it's just a bit of secure shell scripts.

        And last but no less important, I love that tortoise.

        (2 of 2 customers found this review helpful)

         
        4.0

        Good overview/introduction

        By MrSafferity

        from London, UK

        About Me Developer

        Verified Reviewer

        Pros

        • Easy to understand
        • Helpful examples
        • Well-written

        Cons

          Best Uses

          • Intermediate
          • Novice

          Comments about oreilly Classic Shell Scripting:

          I'm only about half way through this, but so far I think its a great introduction (or perhaps refresher) to *nix scripting

          I'd recommend it for sure - then maybe recommend "sed & awk" as a next step

          (1 of 3 customers found this review helpful)

           
          5.0

          Excellent

          By Michael Garfield Sorensen, CeDeT

          from Undisclosed

          Comments about oreilly Classic Shell Scripting:

          This is a concise, clear, no-nonsense, straight-to-the-point programmer's guide to bash shell scripting. It is the most well-written guide I have ever read!

          (2 of 2 customers found this review helpful)

           
          4.0

          Correction

          By Amol Kolhe

          from Undisclosed

          Comments about oreilly Classic Shell Scripting:

          I completely disagree with freejak here.

          Every example in chapter 5 is well described with elaborate paragraphs of text. The only commands which are not explained are ones which are to appear in subsequent chapters, and in which case it is mentioned so.

          This is an excellent book, especially if you already have some experience in scripting and unix, this book teaches you all the good options with commands, which you don't come across otherwise in day to day operation.

          It also guides you on how to write scripts the right way, so that they remain portable across systems, and should work 99% of the times.

          (1 of 1 customers found this review helpful)

           
          4.0

          A sound guide to the POSIX shell

          By AjT

          from Undisclosed

          Comments about oreilly Classic Shell Scripting:

          This is a very good introduction to the POSIX shell, as used on various Unix and Linux operating systems. The book covers the basics of how a shell works, how it can be used to write scripts and the standard Unix tool-kit that can be used to do powerful things quickly and easily.

          The book is grounded in standard POSIX tools so does not take advantage of features present in the very latest Bash, Korn and Z shells, but it does mention that sometimes if you are willing to trade portability you can do things easier and quicker.

          The book does not require a deep understanding of the Unix philosophy but it does help to have used the basic Unix/Linux tools in the past. As well as shell, the book covers the standard tool-kit such as cut, head, tail, grep, sed and a large chunk of awk.

          The book is well written and organised and there are plenty of code snippets and explanations to keep you going. The book does not really cover the interactive use of shell, it really is all about scripting with shell as the title suggests.

          If I have one problem with the book it is that there is an almost pathological avoidance of the dynamic languages such as Perl, Python and Ruby. Some of the longer shell examples would have been much better written in a more complete language such as Perl which are better suited to the larger tasks that shell is not designed for.

          Combined with a good introductory books such as "Learning the Bash Shell" or "Learning the Korn Shell" you are well on the way to driving a Unix/Linux system without a mouse!

          (2 of 2 customers found this review helpful)

           
          5.0

          Perfect updated shell scripting reference

          By Henrik Kramshoj

          from Undisclosed

          Comments about oreilly Classic Shell Scripting:

          Seeing the pretty unfair stars from bad reviews I thought I would share my views on this book, and I will only make a single review - as to not skew the stars like the beginner did ;-)

          This book is one of my all-time favourites, and I recommend it again and again to people working with UNIX. This is one of the most important books if you are an administrator in charge of various UNIX based systems.

          I come from a UNIX environment at the beginning of 1990's and have used UNIX systems like HP-UX, SunOS/Solaris, Linux (SLS to Kubuntu), OpenBSD and AIX - about 15+ years of UNIX.

          During this time UNIX tools and scripting has evolved tremendously and I have been caught sometimes using "yesterdays" ways of doing things.

          This book immediately taught me how to do things in better ways and told me why some of my old habits should go out the door ASAP.

          This book does go from beginner, having the basics of how to create a script using #! but is very dense and could be combined with some introductory stuff - another book on your favourite shell perhaps.

          Over the years you will enjoy this book when working with UNIX and researching how to do a shell script task in an efficient AND portable way. To me it is an instant classic!

          (3 of 10 customers found this review helpful)

           
          1.0

          Correction

          By freejak

          from Undisclosed

          Comments about oreilly Classic Shell Scripting:

          I need to make a correction to my earlier review. There are some example scripts included beginning in Chapter 5. I must have blanked these out of my memory because of their painful associations.

          This is a line from the first (first!) example:

          sed -e 's=^\([^:]*\):[^/]*/\([^/]*\)/.*$=\1:\2=' $OFFICE

          For Pete's sake, what ever happened to "Hello World"?

          (3 of 7 customers found this review helpful)

           
          1.0

          If you want to start learning to write Shell scripts, don't start here

          By freejak

          from Undisclosed

          Comments about oreilly Classic Shell Scripting:

          Yesterday I officially gave up on the "Classic Shell Scripting" book. I don't like to give up on stuff, but this was a frustrating waste of time for me. After 120 pages I had had enough of SED/Awk examples, massive regular expressions, snippets that didn't work and not a single actual example of a shell script. This is not a book from which to start to learn how to write shell scripts.

          I see that the other reviewers here give O'Reilly a pass by making more or less the same observation (albeit in kinder/gentler terms). I will not. The authors state in the Preface that this *is* a book for beginners to use to learn how to write Shell scripts. This is not helping the reader. This book either needs a very substantial re-write or a new, more accurate title and presentation.

          After some analysis based on reader reviews I am going to take this from the top using the ""KornShell Programming Tutorial" from HP Press, authored by Barry Rosenberg. This book has garnered a average 5 star rating in reader reviews at amazon.com. Looks like a better starting point to me.

          (4 of 4 customers found this review helpful)

           
          4.0

          USALUG.org Review of Classic Shell Scripting""

          By Crouse

          from Undisclosed

          Comments about oreilly Classic Shell Scripting:

          USA Linux Users Group Book Review

          Original review posted at: http://www.usalug.org/phpBB2/viewtopic.php?p=77554 ()

          Reviewer: Crouse

          Book Review: Classic Shell Scripting

          Authors: Arnold Robbins, Nelson H.F. Beebe

          Publisher: O'reilly

          First Edition May 2005

          ISBN: 0-596-00595-4

          560 pages, $34.95 US, $48.95 CA, £24.95 UK

          http://www.oreilly.com/catalog/shellsrptg/index.html ()

          http://www.oreilly.com/catalog/shellsrptg/errata/shellsrptg.confirmed ()

          This book is designed for intermediate to advanced Linux users. The book states in the preface that before reading the book you should know some things about shell scripting already. This book isn't for those new to shell scripting. In my opinion, it kind of picks up where "Learning the Bash Shell" from O'reilly left off. It compliments that book pretty well. Each chapter builds on the concepts and materials covered in the chapter before, so it's a book that is best read front to back and not just used as a reference, you will get more from it that way.

          The chapters titles show the progression of the book in what i considered to be a pretty good order. Chapter one and two start off with the basic history, and you quickly move to the next chapters which are the bulk of the book. They are as follows.

          Chapter 3 Searching and Substitutions

          Chapter 4 Text Processing Tools

          Chapter 5 Pipelines can do Amazing Things

          Chapter 6 Variables, Making Decisions, and Repeating Actions

          Chapter 7 Input and Output, Files, and Command Evaluation

          Chapter 8 Production Scripts

          Chapter 9 Enough Awk to be Dangerous

          Chapter 10 Working with Files

          Chapter 11 Extended Example

          Chapter 12 Spellchecking

          Chapter 13 Processes

          Chapter 14 Shell Portability Issues and Extentions

          Chapter 15 Secure Shell Scripts

          Worthy of noting are the a couple of the appendix titles.

          Appendix A. Writing Manual Pages

          Appendix B. Files and Filesystems.

          Personally, I think these could just have easily been additional chapters in the book. The book makes nice use of examples and generally gives very detailed and descriptive explanations of those examples. The book does indeed build upon previous examples and chapters, making this a very easy to read book. I've found a lot of books simply assume that you have covered topic X somewhere already, and are much more suited for simple reference than they are actually reading. This book is useful as a reference, but it is very suited for reading as well. A lot of the commands that are used have a detailed explanation of them, plus caveats at the bottom, which is something many man pages don't include. I found those interesting as well. They provided insight into why some commands might not work as expected.

          The chapters also contained a huge number of (Item / Description) type boxes for almost everything. An example would be for "Print Escape Sequences" from Chapter 7.

          ------------------------------------------

          Sequence.................. Description

          \a ............. Alert character, usually the ASCII BEL character.

          \b .............. Backspace

          \c ............. Suppress any final newline in the output.

          ........ and on down the list of escape sequences (about 8 more items in the list)

          ------------------------------------------



          I realize that this may sound "trivial", but putting those tables of data actually IN the chapters made it much more enjoyable to read than some other books on the same subject. I was not forever having to flip to the appendix to view the data , that definitely works better "in context" right next to the examples and explanations of the subject matter.

          All in all, I'd give this book a 8 out of 10 rating. The only reason I wouldn't give it a 10 is the few errors that have been found in the book. (see above link). I actually noticed a couple myself. Nothing earth shattering, but none the less, for that alone it couldn't earn a 10 out of 10 mark. The book is an excellent companion to "Learning the Bash Shell", and if you liked that book, you'll love this one. Again, this isn't for those new to shell scripting, but is a great intermediate book. This will be a book that will have a permanent home on my bookshelf looking like an old phonebook, tattered and used. Isn't that the best sign of a great book ?

          Displaying reviews 1-10

          Back to top

          Previous | Next »

           
          Buy 2 Get 1 Free Free Shipping Guarantee
          Buying Options
          Immediate Access - Go Digital what's this?
          Ebook: $31.99
          Formats:  APK, DAISY, ePub, Mobi, PDF
          Print & Ebook: $43.99
          Print: $39.99