Bash for Fun
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!"
- 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
- Variable expansion
- Logical eval
- Arithmetic eval
- Subshell eval
- Text juxtaposition
- Short circuit logic evaluation
- Chaining statements
- Loops and control statements
- Processing arguments
- Basic terminology
- The meaning of zero
- Using I/O
- Pipes and functional composition
- Ratio in fixed point arithmetic
- Percentages (in integer arithmetic)
- General division
- Adding fixed point numbers
- Automatic multithreading
- Rant about security and privacy
- Encrypting many files faster
- 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.
See full terms
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $12 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.