Vous voulez voir cette page en français ? Cliquez ici.


or
Sign in to turn on 1-Click ordering.
More Buying Choices
Have one to sell? Sell yours here
Pro Bash Programming: Scripting the GNU/Linux Shell
 
 

Pro Bash Programming: Scripting the GNU/Linux Shell [Paperback]

Chris Johnson

List Price: CDN$ 38.50
Price: CDN$ 23.16 & eligible for FREE Super Saver Shipping on orders over CDN$ 25. Details
You Save: CDN$ 15.34 (40%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.ca. Gift-wrap available.
Only 2 left in stock--order soon (more on the way).
Want it delivered Tuesday, May 29? Choose One-Day Shipping at checkout.

Frequently Bought Together

Customers buy this book with bash Pocket Reference CDN$ 9.98

Pro Bash Programming: Scripting the GNU/Linux Shell + bash Pocket Reference
Price For Both: CDN$ 33.14

Show availability and shipping details

  • This item: Pro Bash Programming: Scripting the GNU/Linux Shell

    In Stock.
    Ships from and sold by Amazon.ca.
    Eligible for FREE Super Saver Shipping on orders over CDN$ 25. Details

  • bash Pocket Reference

    In Stock.
    Ships from and sold by Amazon.ca.
    Eligible for FREE Super Saver Shipping on orders over CDN$ 25. Details


Product Details


Product Description

Product Description

The bash shell is a complete programming language, not merely a glue to combine external Linux commands. By taking full advantage of shell internals, shell programs can perform as snappily as utilities written in C or other compiled languages. And you will see how, without assuming Unix lore, you can write professional bash 4.0 programs through standard programming techniques.

  • Complete bash coverage
  • Teaches bash as a programming language
  • Helps you master bash 4.0 features

What you’ll learn

  • Use the shell to write new utilities and accomplish most programming tasks.
  • Use shell parameter expansion to replace many external commands, making scripts very fast.
  • Learn to avoid many common mistakes that cause scripts to fail.
  • Learn how bash’s readline and history libraries can save typing when getting user input.
  • Learn to use the new bash 4.0 features.
  • Build shell scripts that get information from the Web.

About the Apress Pro Series

The Apress Pro series books are practical, professional tutorials to keep you on and moving up the professional ladder.

You have gotten the job, now you need to hone your skills in these tough competitive times. The Apress Pro series expands your skills and expertise in exactly the areas you need. Master the content of a Pro book, and you will always be able to get the job done in a professional development project. Written by experts in their field, Pro series books from Apress give you the hard–won solutions to problems you will face in your professional programming career.

About the Author

Chris F.A. Johnson was introduced to Unix in 1990, and learned shell scripting because there was no C compiler on the system. His first major project was a menu-driven, user-extensible database system with report generator. Chris uses the shell as his primary, general-purpose programming language, and his projects have included a member database, menuing system, and POP3 mail filtering and retrieval. Chris is the author of "Shell Scripting Recipes: A Problem-Solution Approach" (Apress 2005). When not pushing shell scripting to the limit, he designs and codes web sites, teaches chess, and composes cryptic crosswords.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Tag this product

 (What's this?)
Think of a tag as a keyword or label you consider is strongly related to this product.
Tags will help all customers organize and find favorite items.
Your tags: Add your first tag
 

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

There are no customer reviews yet on Amazon.ca
5 star:    (0)
4 star:    (0)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
Share your experience with this product with others
Create your own review
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com: 4.3 out of 5 stars (9 customer reviews)

3 of 3 people found the following review helpful
5.0 out of 5 stars Not just for beginners, Jun 29 2011
By Jared Still - Published on Amazon.com
This review is from: Pro Bash Programming: Scripting the GNU/Linux Shell (Paperback)
I have been looking to update my Kochan and Wood, as it is a bit dated (Hayden Books, 1990).

Over the past couple years I have considered both for sale published works and free online sources for an updated book on shell programming, as Bash has introduced so many new features in the past years.

Though the description states that beginners can use this book, it does progress quickly into more advanced topics.

The positive reviews here and the general excellent quality of Apress books led me to buy this, and I was not disappointed.

In addition to detailing shell features and showing how to use them, Johnson has done something that is not frequently done - he has shown *why* I might want to use a feature.

Chapter 6 for example has excellent explanations of Parameter expansion. Wondering why I might want to use ${VAR:+Alternate} Johnson shows how it is useful. In this case I was able to immediately use it in a script that was being developed, simplifying it greatly.

Kudos for a job well done.

5 of 6 people found the following review helpful
2.0 out of 5 stars A disappointment, July 10 2011
By Terence C Brennan "Tough marker" - Published on Amazon.com
Amazon Verified Purchase(What's this?)
This review is from: Pro Bash Programming: Scripting the GNU/Linux Shell (Paperback)
I am a long-time user of Linux, and so of Bash. I own several books on Bash programming, but I have always had trouble with Bash syntax, and I was looking forward to a book that treated Bash as a programming language, which is what the blurb promised. Sorry, this is NOT an explanation of Bash as a programming language.

The first thing I noticed about the book is that it is physically hard to read - small, hard to read type on large pages. This may not bother other readers with younger eyes.

The second thing I noticed was that the book does not talk about the syntax of Bash statements. My biggest problem writing Bash scripts is getting the spaces where they belong. A book that presents Bash as a language should certainly explain the basic syntax of statements, including where the spaces go and don't go - that's key to syntax, isn't it? Sorry, not here.

So what's left? A book, not terribly well written, which talks about Bash programming techniques. Fine, but there are good books already out there. I would suggest "Classic Shell Scripting" from O'Reilly. It's long, but it covers not only Bash itself, but command line programs like awk which can be used inline. I find it easy to read, both physically and stylistically. I have also found "Linux Shell Scripting with Bash" from Developer's Library to be helpful.

5 of 6 people found the following review helpful
5.0 out of 5 stars A Good Guide Through the Mysteries of Bash Programming, Feb 9 2010
By Neil G. Matthews - Published on Amazon.com
This review is from: Pro Bash Programming: Scripting the GNU/Linux Shell (Paperback)
Considering the critical role Bash has in the installation and operation of Linux distributions and thereby its ubiquity, Bash as a programming language is frequently overlooked by programmers. The author of Pro Bash Programming has done a creditable job in providing the wherewithal for everyone from beginners to expert shell programmers to write more powerful and efficient scripts using Bash, as he takes you through a fast paced coverage of bash's capabilities. Along the way, many useful, well explained and commented practical scripts are provided, many of which can be used to build and test your own scripts. The author claims that while he used to use C when he needed extra speed, that was several years ago and he now does everything in the shell. This book shows how.

The 230 page book is divided into the 15 chapters below, with each chapter ending with a summary of the commands covered and some well chosen exercises.

1 Hello, World! Your first Shell Program
- how to create and run a script and establish good scripting habits
2 Input, Output and Throughput
- echo, printf, read and IO streams
3 Looping and Branching
- tests, conditional execution, looping constructs
4 Command-Line Parsing and Expansion
- quoting, brace, tilde, parameter, variable arithmetic and pathname expansion, command and process substitution, word splitting and parsing with getops
5 Parameters and Variables
- variable scope (essential reading), positional parameters and expansion using patterns, arrays - indexed and associative
6 Shell Functions
- how to define, use and set exit codes, use of compound commands, creation and use of function libraries
7 String Manipulation
- concatenation, processing character by character, case conversion, inserting, overlaying and trimming strings
8 File Operations and Commands
- reading, use of external commands, regular expressions with grep, sed and awk, file name expansion options
9 Reserved Words and Builtin Commands
- good coverage of builtin commands, particularly read (including into arrays) plus a very informative section on how to use builtin commands correctly
10 Writing Bug-Free Scripts and Debugging the Rest
- good scripting programming recommendations for bug free code plus a test and debug example
11 Programming for the Command Line
- manipulating the directory stack, filesystem and miscellaneous functions, managing man pages, games!
12 Runtime Configuration
- command line options and arguments, menus, configuration files, scripts with several names, using environment variables
13 Data Processing
- sorting and searching arrays, various ways of reading arrays into memory, grids (string and two dimensional), data file formats
14 Scripting the Screen
- using the screen as a blackboard or canvas, rendition modes and colours, text scrolling - rolling dice example
15 Entry-Level Programming
- single key entry, use of author's key-funcs library, sanity checking, form entry, reading the mouse!

Appendix: Shell Variables
- alphabetic listing of (1) variables set by bash and (2) variables used by bash

One of the strengths of this book is that the author explains the fastest way to accomplish many standard programming tasks through the appropriate choice of one of the many different bash methods available, including the choice between builtin bash commands and external commands. I found chapter 9 particularly interesting here. Chapter 7 shows how effective bash is at string manipulation with the right techniques - amazing! While the book covers bash 4.0 and often uses non POSIX extensions, those unable to use bash 4.0 or constrained to POSIX compliant code are not forgotten, with the author providing alternatives that work within these constraints.

Where a subject is introduced in an early chapter and expanded on later, the author thoughtfully provides the forward reference. Source code for the included scripts is available from the publisher's webpage for this book at [...]

The 10 page index works reasonably well, but you may find it worthwhile grabbing the companion eBook so you can directly search through the book to make the best use of it as a reference source. If you buy the dead tree version, the eBook is available on-line for $10 until April 2010 direct from the publisher.

I can recommend this book to anyone that can benefit from automating repetitive shell based tasks in Linux but isn't sure how best to go about it. The included scripts and wealth of tips on how to avoid common bash coding problems will provide you with a quick return on your investment.

Neil Matthews
 Go to Amazon.com to see all 9 reviews  4.3 out of 5 stars 

Listmania!

Create a Listmania! list

Look for similar items by category


Look for similar items by subject


Feedback


Amazon.ca Privacy Statement Amazon.ca Shipping Information Amazon.ca Returns & Exchanges