Shell Functions by Marty McGowan [Leanpub PDF/iPad/Kindle]
Shell Functions
Shell Functions
Shell Functions

Last updated on 2013-10-19

About the Book

In 8 Chapters, you are taken through the steps to write your first shell functions.  You will learn how to capture your command history and turn any of your commands into shell functions.   Presumably, you have commands and command sequences which you use more often, and could use a simpler format.  By the time you have finished this introduction to shell functions, you will be able to collect, save, and re-use those functions in your daily routine, as if they were built-in commands.

The examples here have been tested in the bash shell, and are allegedly compatible with ksh.

Here is the Chapter list:

  • Write a shell function
  • Use functions arguments
  • Inspect a function body
  • Loop with foreach
  • A brief history of shell commands
  • Semantic comments
  • Collect, save and re-use functions
  • What's next?

The first and last chapters are available in the free Sample.

The last chapter points at future topics.   I've quite a bit of work already for those future subjects.  In this book, I look forward to reader review and criticism to make this generally accessible for the widest audience of shell programmers.

Since the sales figures just past a personal goal, the price has been adjusted.   I have an appendix in the works.   For those who have a copy, i'll be looking at the discount feature to give you incentive to come back.    Contact me to give suggestions if you have a copy and would like to comment.

About the Author

Marty McGowan
Marty McGowan

The Shell has been my programming interest for over three decades.  

In the last decade, I've honed the practice of shell funcitons.   I started this in the early- mid-90s, with my first creation, a shell function library I notoriusly named Hennies,  after the recently departed Henny Youngman, since "You've got to be a one-liner to get in here"

A list of stops on my education and career:

  • S.B from MIT in Mechanical Engineering
  • Intelligence analyst for the NSA
  • Fortran programmer in NORAD's Cheyenne Mountain
  • where i "discovered" Unix on 1/15/1979 in Palo Alto
  • Unix software Test
  • Bell Labs MTS and systems engineer 
  • Voting member of IEEE's POSIX (O/S) standard
  • Unix Verification testing
  • US Patent Holder -- Wireless Information Systems -- 5559520
  • High School math and computer instructor
  • Tech Trainier for Wall St financial services firm

The Leanpub Unconditional, No Risk, 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! 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. It really is that easy.

Learn more about writing on Leanpub