Slashdot Mirror


Wicked Cool Shell Scripts

norburym writes with a review of Wicked Cool Shell Scripts - 101 Scripts for Linux, Mac OS X, and UNIX Systems. "This incredibly fun book (really!), written by Dave Taylor, a veteran UNIX, Solaris and Mac OS X author, is chock full of 101 scripts to customize the UNIX (Bourne) shell." Read on for the rest. Wicked Cool Shell Scripts - 101 Scripts for Linux, Mac OS X, and UNIX Systems author Dave Taylor pages 368 publisher No Starch Press rating 10 reviewer Mary Norbury-Glaser ISBN 1593270127 summary 101 Scripts for Linux, Mac OS X, and UNIX Systems

Chapters are divided into an array of topics sure to catch the attention of any UNIX based system user: The Missing Code Library, Improving on User Commands, Creating Utilities, Tweaking Unix, System Administration: Managing Users, System Administration: System Maintenance, Web and Internet Users, Webmaster Hacks, Web and Internet Administration, Internet Server Administration, Mac OS X Scripts, and Shell Script Fun and Games.

In true "cookbook" fashion, each hack is numbered and divided into The Code, How It Works, Running the Script, The Results and Hacking the Script. Throughout, the author clearly describes the syntax and functionality of each script, often with additional notes in How It Works detailing the syntax process and interesting asides. But Hacking the Script is what gives Wicked Cool Shell Scripts true value; where applicable, the author uses this section to describe script modifications to achieve a variety of alternative real world, practical results. This additional section alone easily triples the total number of scripts the reader is exposed to.

This book enables the reader to get "up close and personal" with their UNIX based system and explore the possibilities afforded by becoming intimate with the command line interface. The reader will find themselves easily propelled into the world of scripting, thanks entirely to Dave Taylor's ability to take what some might describe as a fairly dry topic and translate it into a logical and user friendly construct. Just reading through the table of contents is inspiring and intriguing; did you know you could write a script to retrieve movie info from IMDb? or track the value of your stock portfolio? or that you can use a very simple script to check spelling on your web pages?

Sysadmins and webmasters will find this book fundamentally critical to day-to-day operations; there are dozens of invaluable, customizable scripts highlighted in this book to enable professionals to save time and add simple, elegant solutions to annoying issues in their work environment. User account management, rotating log files, cron scripts, web page tweaks, apache passwords, synchronizing via ftp, etc. are all eminently useful and tweakable.

Geeky home users will discover they can use these scripts to work with files and directories, create spell-checking utilities, calculate loan payments, create summary listings of their iTunes libraries, and of course, play games. Many of the sysadmin scripts would also be of interest to the power user: analyzing disk usage, killing processes by name and backing up directories, to name a few. Both types of users will find this book inspiring and truly fun!

One of the secret pleasures of a technical book reviewer is finding those wonky bits of code that suffer from misplaced or missing punctuation, misspelled words and other basic typographic errors inherent in the book publishing process. I randomly selected many of these scripts to try out in the process of doing this review and...dang, haven't found any errata yet. But be sure to check out the errata page on Dave Taylor's web site for any that more astute readers may find (there were none, as of this writing).

Also be sure to take a closer look at Dave's shell script library, which lists additional scripts that didn't make the cut for the book. As convenient as it is to download the entire script library, I would like to stress the value of buying the book, which will provide you with invaluable instruction and guidance in understanding the syntax of the scripts and it also illustrates how making small but significant tweaks can modify the output to match your specific needs.

(A special nod of appreciation to Dave Taylor's Tintin references!)

You can purchase Wicked Cool Shell Scripts - 101 Scripts for Linux, Mac OS X, and UNIX Systems from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

17 of 569 comments (clear)

  1. What about us Windows users?! by Anonymous Coward · · Score: 4, Funny

    I could use some wicked cool batch files.

    1. Re:What about us Windows users?! by foistboinder · · Score: 5, Funny

      Just use cygwin.

    2. Re:What about us Windows users?! by freeze128 · · Score: 5, Funny

      I know where you can get a wicked cool .PIF file... Hold on, I'll email it to you. Look for the subject "Your Details".

    3. Re:What about us Windows users?! by kin_korn_karn · · Score: 4, Funny

      this reminds me of when I used to hang out on IRC and set the channel topics to "press ALT-F4 for ops!" Half the channel would drop

  2. Woo by System.out.println() · · Score: 4, Funny

    And here I thought I was done with buying books.

    *Bookmarks this page for when I get money*

  3. Usage guide found on page one. by Kenja · · Score: 4, Funny

    Step 1. Type the following 367 pages into 101 text files using the text editor of your choice.
    Step 2. Type 'chmod a+x ./*' and hit enter.

    --

    "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
  4. Hmm. by markov_chain · · Score: 5, Funny

    did you know you could write a script to retrieve movie info from IMDb?

    Please please tell me it's not

    #!/bin/sh
    wget 'http://imdb.com/title/tt0151804/'

    --
    Tsunami -- You can't bring a good wave down!
    1. Re:Hmm. by Anonymous Coward · · Score: 5, Funny

      I wonder if he also includes a script for completing TPS reports.

  5. Hmm... by Psychor · · Score: 5, Funny
    'Wicked Cool' shell scripts, a sure way to impress the ladies! Could anything be cooler than a script to calculate loan payments? I seriously doubt it!

    Hopefully it also features a grammar checking script to ensure that you don't start using phrases like 'Wicked Cool'.

  6. Re:Why shell? by Anonymous Coward · · Score: 5, Funny

    No. You do not have to settle for less. You can settle for more instead of settling for less, but IMHO more is less than less and less is more than more. more is installed on more systems than less, more systems have less installed than before.

  7. Re:the best shell script by u01000101 · · Score: 5, Funny

    rm -rf *

    A better idea is to write "rm -rf ~/*", name the script "ls" and put it in your home directory to punish people with "." in $PATH . Now _that's_ teh funnay. :)

    --
    if you use a good enough junk-filter, slashdot.org will display a single, *blank*, page
  8. A very cool shell script by Pan+T.+Hose · · Score: 5, Funny

    Very recently, after reading a (Score:5, Insightful) idea on what would "make Linux four times what it is today" I decided to write a shell script which does exactly that. Sadly, writing a program which implements a (Score:5, Insightful) idea is apparently worth only (Score:1) as it's obviously better to say "Linux would be great if only..." than just doing it. Anyway, I have released it under the GNU General Public License. Enjoy!

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  9. Re:Hmm... by WillyElectrix · · Score: 5, Funny

    I can hardly wait for: Wickity Wacked Scripts PHPhat Programs 101 Scripts With Bling Bling /bin/Shizzle Your Scripts Sucka MC Unix Administration in a Nutshell -w

  10. Is there a shell script to... by caffiend666 · · Score: 5, Funny

    Is there a shell script included that makes it look like you are working? Isn't that the purpose of all good shell scripts?

    Freedom is trouble :)

    --
    Here's to losing my Karma Bonus again....
  11. Really??? by hungsolo · · Score: 5, Funny
    or that you can use a very simple script to check spelling on your web pages?

    Quick! Somebody pick this up for Taco!

  12. Re:the best shell script by Mr+Slushy · · Score: 4, Funny

    rm -rf /

    One of the reasons I love unix, is that it will let you shoot yourself in the foot, and it will steady the gun while you take aim at your toe.

    --

    S.E.S.S.D.E.N.E.E.NW from west end of hall of mists

  13. Re:Hmm... by ocie · · Score: 4, Funny

    This would make a great programming/scripting language:

    #/bin/shizle -yo

    #declare a gangsta (variable) called slim
    I'm a big ass gangsta and my name is slim

    #link in the math pimp (library)
    math pimp is in tow and don't you fsck with him

    #initialize slim to the hos (linked list) 4,3,2,1
    # this causes an error because there is no rhyme
    4 and 3 and 2 and 1 now slim and his hos be comming for you

    #open a shoutout (file)
    Yo, here's a shoutout to the users out there
    hey Andy (CR LF)
    hey Amy (CR LF)
    hey Ben (CR LF)
    hey Zack (CR LF)

    #exit with no error code
    peace out

    % ./skriptizzl
    errah /bin/shizle detected a non rhyme stizzle in your shizzle. Line 10 son, check it out yo!

    --
    JET Program: see Japan, meet intere