BN.com Gift Guide

Classic Shell Scripting: Hidden Commands that Unlock the Power of Unix

Overview

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 ...

See more details below
Paperback (1st Edition)
$24.92
BN.com price
(Save 37%)$39.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (19) from $6.11   
  • New (7) from $22.10   
  • Used (12) from $6.11   
Classic Shell Scripting: Hidden Commands that Unlock the Power of Unix

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$17.99
BN.com price
(Save 43%)$31.99 List Price

Overview

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.

Read More Show Less

Product Details

  • ISBN-13: 9780596005955
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 5/23/2005
  • Edition description: 1st Edition
  • Edition number: 1
  • Pages: 560
  • Sales rank: 494,669
  • Product dimensions: 7.00 (w) x 9.10 (h) x 1.10 (d)

Meet the Author

Arnold Robbins, an Atlanta native, is a professional programmer and technical author. He has worked with Unix systems since 1980, when he was introduced to a PDP-11 running a version of Sixth Edition Unix. He has been a heavy AWK user since 1987, when he became involved with gawk, the GNU project's version of AWK. As a member of the POSIX 1003.2 balloting group, he helped shape the POSIX standard for AWK. He is currently the maintainer of gawk and its documentation. He is also coauthor of the sixth edition of O'Reilly's Learning the vi Editor. Since late 1997, he and his family have been living happily in Israel.

Nelson Beebe is a long time Unix user and system administrator, and has helped for years on Usenet newsgroups.

Read More Show Less

Table of Contents

Foreword;
Preface;
Intended Audience;
What You Should Already Know;
Chapter Summary;
Conventions Used in This Book;
Code Examples;
Unix Tools for Windows Systems;
Safari Enabled;
We'd Like to Hear from You;
Acknowledgments;
Chapter 1: Background;
1.1 Unix History;
1.2 Software Tools Principles;
1.3 Summary;
Chapter 2: Getting Started;
2.1 Scripting Languages Versus Compiled Languages;
2.2 Why Use a Shell Script?;
2.3 A Simple Script;
2.4 Self-Contained Scripts: The #! First Line;
2.5 Basic Shell Constructs;
2.6 Accessing Shell Script Arguments;
2.7 Simple Execution Tracing;
2.8 Internationalization and Localization;
2.9 Summary;
Chapter 3: Searching and Substitutions;
3.1 Searching for Text;
3.2 Regular Expressions;
3.3 Working with Fields;
3.4 Summary;
Chapter 4: Text Processing Tools;
4.1 Sorting Text;
4.2 Removing Duplicates;
4.3 Reformatting Paragraphs;
4.4 Counting Lines, Words, and Characters;
4.5 Printing;
4.6 Extracting the First and Last Lines;
4.7 Summary;
Chapter 5: Pipelines Can Do Amazing Things;
5.1 Extracting Data from Structured Text Files;
5.2 Structured Data for the Web;
5.3 Cheating at Word Puzzles;
5.4 Word Lists;
5.5 Tag Lists;
5.6 Summary;
Chapter 6: Variables, Making Decisions, and Repeating Actions;
6.1 Variables and Arithmetic;
6.2 Exit Statuses;
6.3 The case Statement;
6.4 Looping;
6.5 Functions;
6.6 Summary;
Chapter 7: Input and Output, Files, and Command Evaluation;
7.1 Standard Input, Output, and Error;
7.2 Reading Lines with read;
7.3 More About Redirections;
7.4 The Full Story on printf;
7.5 Tilde Expansion and Wildcards;
7.6 Command Substitution;
7.7 Quoting;
7.8 Evaluation Order and eval;
7.9 Built-in Commands;
7.10 Summary;
Chapter 8: Production Scripts;
8.1 Path Searching;
8.2 Automating Software Builds;
8.3 Summary;
Chapter 9: Enough awk to Be Dangerous;
9.1 The awk Command Line;
9.2 The awk Programming Model;
9.3 Program Elements;
9.4 Records and Fields;
9.5 Patterns and Actions;
9.6 One-Line Programs in awk;
9.7 Statements;
9.8 User-Defined Functions;
9.9 String Functions;
9.10 Numeric Functions;
9.11 Summary;
Chapter 10: Working with Files;
10.1 Listing Files;
10.2 Updating Modification Times with touch;
10.3 Creating and Using Temporary Files;
10.4 Finding Files;
10.5 Running Commands: xargs;
10.6 Filesystem Space Information;
10.7 Comparing Files;
10.8 Summary;
Chapter 11: Extended Example: Merging User Databases;
11.1 The Problem;
11.2 The Password Files;
11.3 Merging Password Files;
11.4 Changing File Ownership;
11.5 Other Real-World Issues;
11.6 Summary;
Chapter 12: Spellchecking;
12.1 The spell Program;
12.2 The Original Unix Spellchecking Prototype;
12.3 Improving ispell and aspell;
12.4 A Spellchecker in awk;
12.5 Summary;
Chapter 13: Processes;
13.1 Process Creation;
13.2 Process Listing;
13.3 Process Control and Deletion;
13.4 Process System-Call Tracing;
13.5 Process Accounting;
13.6 Delayed Scheduling of Processes;
13.7 The /proc Filesystem;
13.8 Summary;
Chapter 14: Shell Portability Issues and Extensions;
14.1 Gotchas;
14.2 The bash shopt Command;
14.3 Common Extensions;
14.4 Download Information;
14.5 Other Extended Bourne-Style Shells;
14.6 Shell Versions;
14.7 Shell Initialization and Termination;
14.8 Summary;
Chapter 15: Secure Shell Scripts: Getting Started;
15.1 Tips for Secure Shell Scripts;
15.2 Restricted Shell;
15.3 Trojan Horses;
15.4 Setuid Shell Scripts: A Bad Idea;
15.5 ksh93 and Privileged Mode;
15.6 Summary;
Appendix A: Writing Manual Pages;
A.1 Manual Pages for pathfind;
A.2 Manual-Page Syntax Checking;
A.3 Manual-Page Format Conversion;
A.4 Manual-Page Installation;
Appendix B: Files and Filesystems;
B.1 What Is a File?;
B.2 How Are Files Named?;
B.3 What's in a Unix File?;
B.4 The Unix Hierarchical Filesystem;
B.5 How Big Can Unix Files Be?;
B.6 Unix File Attributes;
B.7 Unix File Ownership and Privacy Issues;
B.8 Unix File Extension Conventions;
B.9 Summary;
Appendix C: Important Unix Commands;
C.1 Shells and Built-in Commands;
C.2 Text Manipulation;
C.3 Files;
C.4 Processes;
C.5 Miscellaneous Programs;
Chapter 16: Bibliography;
16.1 Unix Programmer's Manuals;
16.2 Programming with the Unix Mindset;
16.3 Awk and Shell;
16.4 Standards;
16.5 Security and Cryptography;
16.6 Unix Internals;
16.7 O'Reilly Books;
16.8 Miscellaneous Books;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 6 Customer Reviews
  • Anonymous

    Posted September 9, 2005

    Book Review: Classic Shell Scripting

    I found this to be quite a useful book for learning more about Unix/Linux shell scripting. I would consider this one to be an intermediate level text, and complete beginners might be better served by a more simplified book. There are quite a bit of in-depth details included, and many very nice examples and code snippets. Like all O¿Reilly books, it is well organized and formatted, and clearly written. The book opens with a brief history of Unix and how important the shell (and scripting) is to it. There are some comparisons with other programming languages, and why it is sometimes preferable to use a script versus a compiled program. The very basics of how scripts are written and used are also mentioned here, and beginners may want to refer to an additional book for more of the basic instructions. The next few chapters cover mostly text processing with scripts, including searching, sorting, printing, extracting, and counting methods. Good examples are used, including the use of regular expressions and pipes to increase the power of your scripts. Following this, there are several chapters on more advanced scripting, including how to use variables, loops, functions, standard I/O, redirection, wildcards, using ¿awk¿, and working with external files. Extensive example code is provided throughout. The remaining chapters of the book get into more advanced subjects such as database manipulation, process control, and increasing the security of scripts. Portability and shells other than bash are also discussed. Perhaps the most interesting part of the book (for me) were the Appendices and other sections at the end. Appendix A is entitled ¿Writing Manual Pages¿, and is extremely informative on how to produce and format a valid man page. This is a much more complicated process than I had previously known (can you say ¿groff¿?), and is quite interesting. For anyone who has ever complained about a poor man page, this will give you all the tools you need to write an improved version! :) Appendix B has some excellent in-depth discussion about Unix files and filesystems, including attributes and permissions. Appendix C is a summary of important Unix commands for shell scripting, categorized by function, which is a good quick reference list. Following this, there is an excellent Bibliography that recommends related books for further reading. Finally, there is good Glossary and an Index. Overall, I found the book to be excellent in it¿s content and quality. I would recommend that a beginner also find a companion book to more gently introduce the fundamentals of shells and scripting, but this volume is excellent for the intermediate to advanced user. If you want to fully use the power of the Unix/Linux shell, this is a ¿must-have¿ book! Well done to the authors and O¿Reilly Publishing.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 20, 2005

    gets the job done

    With the rise of languages like Java, with its cool widgets, someone unfamiliar with Unix might not realise that there is a type of programming proceeding quietly in the background. The shell scripting described by the book has been a mainstay of every Unix variant for years. The book shows how writing a short script can be used to handle a wide range of tasks. Enhanced by the simple syntax of most shells. Very easy to learn. Helped along by a grab bag of programs like sed; so useful that they are now in the standard unix and linux distributions. From the book, you should also appreciate the input/output pipelining offered by many of these utilities and how this makes for powerful and easy to write scripts. The simplicity of piping an output of a program to the input of another. If this seems too obvious, then you've never had to try the equivalent under VMS (say). That operating system had a dreadful notation which made its scripts far harder to write and understand. The book's subject totally lacks any glamour. But a lot of actual work gets done in these scripts.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 11, 2009

    No text was provided for this review.

  • Anonymous

    Posted May 30, 2011

    No text was provided for this review.

  • Anonymous

    Posted December 6, 2008

    No text was provided for this review.

  • Anonymous

    Posted November 19, 2010

    No text was provided for this review.

Sort by: Showing all of 6 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)