Bash for Fun
$9.99
Minimum price
$19.52
Suggested price

Bash for Fun

Bash Programming: Principles and Examples

About the Book

The intended audience of this book are all those who want to get a better understanding of their computers. Those who wish to use Bash effectively and with confidence.

The ignorant 'clicking of buttons' has done much disservice to these laudable ambitions over the past four decades or so. It is time to rediscover the ancient lore! You, too, will become a wizard of retro programming, massively increase your productivity and gain true ownership of your device.

This book is for you if in the past you got waylayed and discouraged from programming, if you never even started or if you ever thought: "surely, there must be a simpler way of doing this!".

Above all, what you may discover here is that one most rare and precious thing: understanding.

This book is definitely not another boring reference manual. Real programming is a skillful art. This applies especially to programming in Bash. Art is not easily learnt from manuals. Not even from pedagogically perfectly organised treatises full of exhortations and exercises. Manuals are for looking things up, same as are search engines on the internet. By all means, look things up as and when needed but read this first.

This book is based on the author's lifetime experience with using and teaching numerous programming languages. The experience has shown that the most effective way to learn programming is by playing with fun examples.

Examples from cheat sheets, examples of 'boiler plate', examples of powerful techniques that actually accomplish useful things, examples of advanced tips and tricks, examples of amazing solutions to interesting problems. Examples, examples, examples.

It is playing with those inspiring snippets of code that brings on the 'heureka' moments, when we want to shout:

"Wow, I did not know that!"

"So, this is how to do it! Yes, now I really get it!"

"What fun, let me try this myself!"

"Hey, now I can just change this a bit and it will solve my own fascinating problem!"

About the Author

Libor Spacek
Libor Spacek

Libor Spacek began his professional programming career in 1970 in London, UK. A few years later he obtained a BSc degree in Mathematics, MSc (with distinction) in Computer Science and finally a PhD in Artificial Intelligence (AI). He spent most of his working life as an academic in a UK university and some also in Prague in Czech Republic. He has taught Computer Science and AI to great many students at all levels. He also speaks several human languages quite well.

Dr Spacek has eventually retired to Australia, where he now enjoys writing open source software and books like this one, this time just for the fun of it.

Table of Contents

  • Introduction
    • Typesetting conventions
    • Program in Bash anywhere
    • Dialects and styles
    • Why Bash?
    • Notes for the professionals
    • First steps
    • Chapters outline
  • Quoting, Quoting, Quoting
    • Individual characters
    • Literal string
    • Interpreted string
    • Assignment
    • Variable expansion
    • Logical eval
    • Arithmetic eval
    • Eval
    • Braces
    • Subshell eval
    • Text juxtaposition
  • Bash Branching
    • Short circuit logic evaluation
    • Chaining statements
    • Functions
    • Loops and control statements
    • Processing arguments
  • Input-Output
    • Basic terminology
    • The meaning of zero
    • Using I/O
    • Pipes and functional composition
  • Amazing Arithmetic
    • Ratio in fixed point arithmetic
    • Percentages (in integer arithmetic)
    • General division
    • Adding fixed point numbers
  • Subshell Scheduling
    • Automatic multithreading
    • Rant about security and privacy
    • Encrypting many files faster
  • Conclusion
  • Links References

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub