[NBLUG/talk] I want to learn shell scripting.

sms at sonic.net sms at sonic.net
Fri May 14 09:54:02 PDT 2004


> Thanks for tips, everyone. I've decided to go with the O'Reilly bash
> book (with the fish on the cover).  I chose it for various reasons,
> but I may still check out some of the other books that were
> suggested.  I have a feeling that the 'Power Tools' book will be
> better for me when I have a little more knowledge...

RE "Power Tools" -- it's a browsing-book.  Hundreds of tips'n'tricks
culled from usenet & from experienced users' ... well... experiences.

It's not a great "learning" book for any narrow-focus topic, but your
self-described skill-level ("pretty familiar with the command line")
should give you the background you need for over 90% of the material.

You mention the "nugget" from the fish book -- well, the drill book is
*ALL* nuggets, nothin' but.


> Best nugget so far from the fish book:
>
> Ctrl-R from the command line allows reverse-incremental searching
> through the command history - just like in emacs!*  Who knew?

:)
Most "modern" shells try to emulate editor-features so that power-
users can use the features they already know.  It's the Unix Way(tm)
to try to capitalize on existing knowlege*, even the knowlege we put
into finger-habit reflexes.

Sneaky divils, them *nix geeks.


>   You can also set it to respond to vi
>   commands, but why would you do that?
>   <winking-smiley-with-tongue-sticking-out>

< paints your tongue with bitter-apple, just like
  naughty puppies get for chewing on no-no items >
;-)

More seriously:  the emacs / vi holy war won't EVER be won, I think we
all know that.  Or at least, not 'til both editors have died because
everyone who learned on them has died & new editors-of-choice are out
in the world.  Yes, fanatics, it _will_ happen; the day will come when
the ONLY places you can find vi/emacs in use will be in rest-homes for
hackers, where the residents will set up the whole building on Linux
servers running kernel 14.6.22 & later over 802.11(gamma)(having exhaused
.11a - .11z & moved onto the Greek alphabet)... and it will be dog-slow
and incredibly hard to use compared to whatever the staff are using. ;)


But for now, the reason to use vi instead of emacs (a reason for YOU
to use 'em, Mr. Sisley!) is that "vi" is part of the oldschool suite
of UNIX textedit tools that includes "sed" -- and if you want to do
scripting, you will eventually need to include "sed" into your own
toolbox.  So, it'll be worth learning vi-esque (ugly as it is) habits
such as  / pattern-match / pattern-substitution /  now.  YMMnotV.  ;-)


- Steve S.

  * Unfortunately, "capitalize on existing knowlege" can also be a
    crutch for *nix developers/admin's/etc, as they sometimes pre-
    suppose an existing base of experience that, in fact, CAN'T be
    presumed to be there...





More information about the talk mailing list