Shell scripting - What book is more useful for a beginner?

Hi,
since i decided to get more into script programming, i trying to figure out what book might be of a bigger help for a newbie.
On Amazon i read, that UNIX(R) Shells by Example (4th Edition) is the best book since it comes also with examples a newbie can learn from.
This book is from 2004 and i worry a little that it is old. But perhaps this doesn’t matter.

Anyway, would you recommend this book or are there better books to learn from. I lag the knowledge of the basics and i need to start somewhere to make good scripts.
I started off to make for myself a script for installing nonfree stuff after a fresh install. Since i hate to enter everything by itself, i like to have it more automated. The lazy way i guess.
But i would like to make it more convenient and efficient.

So any tip or suggestion i will consider. It just need to be written for a real beginner with examples.

Thanks

On 03/27/2011 11:36 PM, JoergJaeger wrote:
>

> So any tip or suggestion i will consider. It just need to be written
> for a real beginner with examples.

in order to study:

  1. much, but not all of “Rute User’s Tutorial and Exposition”
    http://rute.2038bug.com/

  2. “Bash Guide for Beginners”
    a. http://tldp.org/LDP/Bash-Beginners-Guide/html/
    b. http://tille.garrels.be/training/bash/

  3. “Advanced Bash-Scripting Guide” link available on
    http://tldp.org/guides.html [that page has many other useful resources]


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.1.8, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

Great thing.
Now i have something to read. :slight_smile:

I hope i learn something from it. In time i will know my computer a little better and with that, also Linux better.
Thanks for the links.

Apart from DD’s advice, never forget to consult the man page of bash during your study. It will teach you how to find the exact definitions of statments and that will come in handy later because a “normal” person will know by hart only a small subset of all bash stuff, but you will rememeber that “there was something like …” and then being able to find that quick in the man page is a good thing.

BTW, as bash is based on Ksh (and Posix shell) and all are considarable older than 2004 and have not seen further developements since, a book from 2004 (and older) is OK. I still use a paper man page from 1995 for ksh.

It certainly doesn’t matter as much as, say, a ‘Using KDE’ book would do…

I have to say, regarding the links in DenverD’s post, those are the ones most often quoted, and they are worth reading, but I don’t really find them all that helpful (probably me rather than anything else…but you may share my learning style), so you could also try:

BASH Cures Cancer (OK, the site name maybe sets the bar a little high…)
http://www.bash-hackers.org/wiki

which I find are better at giving you fragments of code that you may want to consider and use as inspiration.

Don’t forget sed and awk.

Well, i took everything in consideration.
But, is a book still relevant then? Seems like that this would already do.

On 03/29/2011 05:06 AM, JoergJaeger wrote:
>
> Well, i took everything in consideration.
> But, is a book still relevant then?

in addition to all the things available on the net, i also find it
very useful to have paper in my hand…

my favorite happens to be what i have a “Linux Unleashed - The
Comprehensive Solution - Third Edition” which came with Red Hat 5.1
when sold new in 1998…

and it is right about 99% of the time (but, don’t expect to find
anything useful except Linux (that is, if you need KDE4 info, you
are outta luck in that three pound book!))

i bought it USED off the shelf, very reasonable (considering i’ve used
it lots, since 2002) at Powell’s Books…they ship:
http://www.powells.com/ and have a searchable database


CAVEAT: http://is.gd/bpoMD
Tried LibreOffice? Do that and help at http://is.gd/dZ9j2W
[NNTP via openSUSE 11.3 + KDE4.5.5 + Thunderbird3.1.8]

It seems to be not available anymore. But thanks for that tip as well.

Oh, btw. their page had an error and it was kinda funny, since it reminded me really of my Amiga. Guru Meditation that is.

(http://www.flickr.com/people/54038606@N05/), on Flickrhttp://farm6.static.flickr.com/5306/5572114623_3e0921d398.jpg

My favorite is the O’Reilly series :
Ellen Siever, «Linux in a Nutshell» | Free eBooks Download - EBOOKEE!

It’s comprehensive and groups, Linux commands, BASH commands, SED, AWK, vi, emacs, pattern recognition, tcsh/csh, package management, version controls, etc. with examples in most cases. I think great for beginners and old timers alike.

Here’s a beginners site:
BASH Programming - Introduction HOW-TO

Here’s a site for interesting BASH/Linux commands you can get lost in by copying from and pasting to your terminal just to see how it works. And if you’re a registered user give it a thumbs up or down:
All commands | commandlinefu.com

One of my first shell scripts was to capture and sort uniquely my bash history so when I vaguely remember a command, i could go to that file to see how I used it. Later I updated it to exclude obvious commands and those that only differ by a file/folder name, like cp, etc.

The book how to learn C++. Because if you learn programming, you learn linux.

On 03/30/2011 01:06 AM, JoergJaeger wrote:
>
> It seems to be not available anymore.

oh, i didn’t intend for you to buy the old one i have, just that an
old one is still good for a lot of things…


CAVEAT: http://is.gd/bpoMD
Tried LibreOffice? Do that and help at http://is.gd/dZ9j2W
[NNTP via openSUSE 11.3 + KDE4.5.5 + Thunderbird3.1.8]

Got it. :slight_smile: I just thought… well.

@tararpharazon

Thanks for that link as well.

So much to read. Now i have something to thinker over.

@JoergJaeger
Good luck

That commandlinefu.com gets me every time for an hour or 2.

I like Ellie Quigley’s book; she has two out, one on shells, the other on perl.