30

I've programmed in a number of languages for two years now, I mean that I know how to design and implement a decent solution for a given problem.

However, bash is being a major headache to me, just nothing does work as expected—or even without errors.

All of the guides I've found were incredibly informal, not properly summarising its syntax or telling the most common errors you can make.

So what can you recommend me?

closed as off-topic by Jeff Schaller, Thomas Dickey, Kusalananda, thrig, roaima Feb 11 '17 at 18:41

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Requests for learning materials (tutorials, how-tos etc.) are off topic. The only exception is questions about where to find official documentation (e.g. POSIX specifications). See the Help Center and our Community Meta for more information." – Jeff Schaller, Thomas Dickey, Kusalananda, thrig, roaima
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    For what it's worth, I was pointed towards the manual today and it's making for an interesting, but rather substantial read. It may be of use to you. – boehj Apr 28 '11 at 18:10
  • Oh I didn't notice this answer, thank you :) – vemv May 2 '11 at 12:24
  • No worries at all. I'm still ploughing through it. :) – boehj May 2 '11 at 14:29
  • 1
    @boehj +1 manual gives people surprises. – Arthur2e5 Oct 15 '15 at 19:21
23

I like the TLDP guides http://tldp.org/guides.html

There is everything from Beginners to Advanced Bash guides; it's how I learned anyways.

  • Thank you, looks like you can find other useful guides in general there, as well. – vemv Apr 28 '11 at 18:53
  • 1
    I read from someone who works on an automatic code checking tool for bash scripts: "TLDP is, shall I say politely, not recommended for guidance on writing shell scripts." – phk Oct 15 '15 at 16:43
  • 1
    @phk Well, it does contain lots of stuffs that are too step-by-step, like blah; exitval=$?; if [ "$exitval" -ne 0 ]… Luckily people learn fast after you point those out. – Arthur2e5 Oct 15 '15 at 19:18
12
All of the guides I've found were incredibly informal, not properly summarising its syntax or telling the most common errors you can make.

The best resource, and one that does address common errors, is Greg's Wiki

Another very good resource for pointers on syntax and good practice is the Bash Hackers Wiki

  • Both seem to be exactly what I need. Thanks – vemv Apr 28 '11 at 18:55
0

Might be a bit late, but I find this site very benficial

www.linuxcommand.org

0

I learn a lot from the book UNIX Power Tools. Although is is not a book exclusively on shell programming, I found the topics are easy to understand and there are plenty of tricks to learn.

0

If you want a bit more detail on what's actually going on and common mistakes you can fall into then this Bash Scripting Tutorial may be a good read.

Not the answer you're looking for? Browse other questions tagged or ask your own question.