{"id":110,"date":"2005-07-04T06:04:26","date_gmt":"2005-07-04T13:04:26","guid":{"rendered":"http:\/\/www.writersperspective.com\/?p=18"},"modified":"2005-07-04T06:04:26","modified_gmt":"2005-07-04T13:04:26","slug":"from-bash-to-z-shell-by-oliver-kiddle-jerry-peek-and-peter-stephenson","status":"publish","type":"post","link":"https:\/\/planet.mcb.guru\/?p=110","title":{"rendered":"From Bash to Z Shell by Oliver Kiddle, Jerry Peek and Peter Stephenson"},"content":{"rendered":"\t<p><em>Note: This review was originally published in <a href=\"http:\/\/www.freesoftwaremagazine.com\/free_issues\/issue_05\/book_review-bash_a_z\/\">Free Software Magazine<\/a><\/em><\/p>\n\t<p><a href=\"http:\/\/www.amazon.com\/exec\/obidos\/ASIN\/1590593766\/mcwords\"><img align=\"left\" hspace=\"10\" vspace=\"10\" height=\"200\" src=\"http:\/\/www.writersperspective.com\/wp-content\/1590593766.jpg\" alt=\"Linux in a Windows World\"\/><\/a>If you use a free software operating system or environment, chances are one of your key interfaces will be through some kind of shell. Most people assume the bulk of the power of shells comes from the commands available within them, but some shells are actually powerful in their own right. Many of the more recent releases being more like a command line programming environment than a command line interface. \u00e2\u20ac\u0153From Bash to Z Shell\u00e2\u20ac\u009d published by Apress, provides a guide to using various aspects of the shell. From the basic command line interaction through to the more complex processes of programming, it touches on file pattern matching and command line completion along the way.<\/p>\n\t<p><strong>The contents<\/strong><\/p>\n\t<p>Shells are complicated \u00e2\u20ac\u201c how do you start describing working with a shell without first describing how the shell works, and don\u00e2\u20ac\u2122t you show them how to use it by doing so? The book neatly covers this problem in the first chapter with what must be the best description of a shell and how the interaction works that I\u00e2\u20ac\u2122ve ever read.<br \/>\n<a id=\"more-18\"><\/a><br \/>\nThis first chapter leads nicely into the first of three main sections. The initial section looks at using a shell, how to interact with the programs which are executed by the shell and how to use shell features such as redirection, pipes and command line editing. Other chapters look at job and process control, the shell interface to directories and files, as well as prompts and shell history.<\/p>\n\t<p>The real meat of the book for me lies in the two main chapters in the middle that make up the second section. The first of these chapters is on pattern matching. Everybody knows about the basics of the asterisk and question mark, but both bash and zsh provide more complex pattern matching techniques that enable you to very find a specific set of files which can simplify your life immensely. The second chapter is on file completion; press TAB and get a list of files that matches what you\u00e2\u20ac\u2122ve started to type. With a little customization you can extend this functionality to also include variables, other machines on your network and a myriad of other potentials. With a little more work in zsh and you can adjust the format and layout of the completion lists and customize the lists according to the environment and circumstances.<\/p>\n\t<p>The third and final section covers the final progression of shell use from basic interaction to programming and extending the shell through scripts. Individual chapters cover the topics of variables, scripts and functions. The penultimate chapter puts this to good use by showing you how to write editor commands \u00e2\u20ac\u201c extensions to zsh that enhance the functionality of the command line editor. Full examples and descriptions are given here on a range of topics, including my favourite: spelling correction.<\/p>\n\t<p>The final chapter covers another extension for the command-line \u00e2\u20ac\u201c completion functions. Both bash and zsh provide an extension system for completion. Although the process is understandably complex, the results can be impressive.<\/p>\n\t<p><strong>Who\u00e2\u20ac\u2122s this book for?<\/strong><\/p>\n\t<p>If you use a shell \u00e2\u20ac\u201c and let\u00e2\u20ac\u2122s face it, who doesn\u00e2\u20ac\u2122t \u00e2\u20ac\u201c then the information provided in the book is invaluable. Everybody from system administrators through developers and even plain old end users are going to find something in this book that will be useful to them.<\/p>\n\t<p>Of all the target groups, I think the administrators will get the most benefit. Most administration involves heavy use of the shell for running, configuring and organizing your machine, and the tricks and techniques in this book will go a long way to simplify many of the tasks and processes that take up the time. Any book that can show you how to shorten a long command line from requiring 30-40 key presses down to less than 10 is bound to be popular.<\/p>\n\t<p><strong>Pros<\/strong><\/p>\n\t<p>The best aspect of the book is that it provides full examples, descriptions and reasoning for the different techniques and tricks portrayed. This translates the content from more than a simple guide and into an essential part of the users desktop guides. The book is definitely not just an alternative way of using the online man pages.<\/p>\n\t<p>The only problem \u00e2\u20ac\u201c although it\u00e2\u20ac\u2122s a good one \u00e2\u20ac\u201c is that reading the book and following the tips and advice given becomes addictive. After you\u00e2\u20ac\u2122ve customized your environment, extended your completion routines and enhanced your command-line once, you\u00e2\u20ac\u2122ll forever find yourself tweaking and optimizing the environment even further.<\/p>\n\t<p>Finally, it\u00e2\u20ac\u2122s nice to see a handy reference guide in one of the appendices to further reading \u00e2\u20ac\u201c much of it online, but all of it useful.<\/p>\n\t<p><strong>Cons<\/strong><\/p>\n\t<p>One of the odd things about the book is that the title doesn\u00e2\u20ac\u2122t really reflect the contents. If you are expecting the book to be guide to using a range of shells \u00e2\u20ac\u02dcFrom Bash to Z Shell\u00e2\u20ac\u2122, as the name suggests, you\u00e2\u20ac\u2122ll be disappointed. Sure, a lot of the material is generic and will apply to many of the shells in use today, but the bulk of the book focuses on just the two shells described in the title, which makes the title a little misleading.<\/p>\n\t<p>Although I\u00e2\u20ac\u2122m no fan of CDs in books, I would have liked to see a CD or web link to some downloadable samples from the book. <\/p>\n\t<table border=\"1\">\n\t<caption align=\"top\">In short<\/caption>\n\t<tr>\n\t<td>Title<\/td>\n\t<td>From Bash to Z Shell<\/td>\n\t<\/tr>\n\t<tr>\n\t<td>Author<\/td>\n\t<td>Oliver Kiddle, Jerry Peek and Peter Stephenson<\/td>\n\t<\/tr>\n\t<tr>\n\t<td>Publisher<\/td>\n\t<td>Apress<\/td>\n\t<\/tr>\n\t<tr>\n\t<td>ISBN<\/td>\n\t<td>1590593766<\/td>\n\t<\/tr>\n\t<tr>\n\t<td>Year<\/td>\n\t<td>2005<\/td>\n\t<\/tr>\n\t<tr>\n\t<td>Pages<\/td>\n\t<td>472<\/td>\n\t<\/tr>\n\t<tr>\n\t<td>CD included<\/td>\n\t<td>No<\/td>\n\t<\/tr>\n\t<tr>\n\t<td>Mark<\/td>\n\t<td>9<\/td>\n\t<\/tr>\n\t<\/table>\n","protected":false},"excerpt":{"rendered":"<p>If you use a free software operating system or environment, chances are one of your key interfaces will be through some kind of shell. Most people assume the bulk of the power of shells comes from the commands available within them, but some shells are actually powerful in their own right. Many of the more recent releases being more like a command line programming environment than a command line interface. \u00e2\u20ac\u0153From Bash to Z Shell\u00e2\u20ac\u009d published by Apress, provides a guide to using various aspects of the shell. From the basic command line interaction through to the more complex processes of programming, it touches on file pattern matching and command line completion along the way.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[17],"_links":{"self":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/110"}],"collection":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110"}],"version-history":[{"count":0,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions"}],"wp:attachment":[{"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planet.mcb.guru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}