/ Linux Reviews / Beginners: Learn Linux / Bash Scripting Introduction - en


Bash Scripting Introduction HOWTO

Francis Litterio

Rohit Patil

2004-XX-XX

Revision History
Revision 1.02006-XX-XXRevised by: FLRP
First release in Docbook format. Based on an earlier version in Linuxdoc format by Mike G.

This HOWTO helps you write basic Bash shell scripts. This HOWTO assumes that you know nothing about shell scripting, but it assumes you have used Bash or the Bourne shell interactively. You do not have to be a programmer to benefit from this HOWTO. This is not an advanced shell scripting HOWTO. If you want to read an advanced document on this topic, see The Advanced Bash-Scripting Guide at the Linux Documentation Project (http://www.tldp.org/).


1. Introduction

1.1. Where to Find This HOWTO

You can always find the latest version of this HOWTO at the Linux Documentation Project at this location:

http://www.tldp.org/HOWTO/Intro-Bash-Scripting-HOWTO.html.

1.2. Overview

The Bourne Again Shell (Bash) is the primary shell of the GNU system. It is compatible with the Bourne shell, which is one of the oldest UNIX shells, but it has many enhancements that make it superior to the Bourne shell. A Bash script is a human-readable file containing commands that are executed by Bash. This HOWTO is an introduction to writing Bash scripts.

This HOWTO is written for anyone who wants to begin writing Bash scripts but who has no prior scripting experience. You do not have to be a programmer to benefit from this HOWTO, but you need to have some experience using Linux (or any UNIX system) from an interactive shell, preferably Bash or the Bourne shell. If you are a C shell user who has never used a Bourne-like shell, some of the Bash commands may appear strange, but this HOWTO should still be valuable to you.

1.3. Disclaimer

No liability for the contents of this document can be accepted. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies in this document that could lead to damage to your system. Proceed with caution, and although damage to your system is highly unlikely, the author(s) do not take any responsibility for damage or loss caused by errors in this document. All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements.

1.4. Credits and Contributors

This document is based on an earlier version written by Mike G. The following people contributed to this document in one form or another:

  • Nathan Hurst
  • Jon Abbott
  • Felix Hudson
  • Kees van den Broek
  • Andreas Beck

1.5. Feedback

Feedback is welcome. Send your comments to the author.

1.6. Translations

There are currently no translations of this document into other languages. If you would like to provide one, please contact the author.


/ Linux Reviews / Beginners: Learn Linux / Bash Scripting Introduction


Meet new people

Adult Dating