Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have learned Java, C++, python. But recently I need to write some bash script.

Is there any book for learning bash script? Not bash command.

share|improve this question
FYI, There's no difference between Unix shell commands and shell scripting. The simplest shell scripts start as pasting a set of commands into a text file, just like you'd enter them at the shell prompt. Sure, you're not as likely to use if/thens and loops at the shell prompt, but they work the same way at the prompt as they do from a script file. Also, note that using syntax specific to one shell (such as bash) is considered poor form for shell scripts. It's better to write in the more universal POSIX Bourne shell (/bin/sh) syntax so that it can execute correctly in any shell. – Spiff Apr 2 '11 at 2:19

The Linux Documentation Project has a VERY nice BASH guide online. They call it the "Advanced Bash-Scripting Guide," but I think it is appropriate for beginners. This is my recommendation.

share|improve this answer
Thanks, I am reading now. – Qinghao Apr 2 '11 at 8:57

From #bash /topic on


share|improve this answer

Here is an answer from SO which I think it will help you to choose between the BashGuide by Lhunath. and Advanced Bash Scripting by Mendel Cooper on The Linux Documentation Project website.

In general, BashGuide is preferred for the beginner and it's very short - only 90 pages!

After that, you can also find a lots of useful information on Bash Pitfalls and Bash FAQ.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .