An open API service indexing awesome lists of open source software.

https://github.com/nixawk/hello-bash

Bash scripting tutorial
https://github.com/nixawk/hello-bash

Last synced: 11 months ago
JSON representation

Bash scripting tutorial

Awesome Lists containing this project

README

          

## Bash (Unix shell)

[**Bash**](https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29) is a [Unix shell](https://en.wikipedia.org/wiki/Unix_shell) and command language written by [Brian Fox](https://en.wikipedia.org/wiki/Brian_Fox_(computer_programmer)) for the [GNU Project](https://en.wikipedia.org/wiki/GNU_Project) as a free software replacement for the Bourne shell. First released in 1989, it has been distributed widely as it is a default shell on the major Linux distributions and on OS X.

>
No programming language is perfect. There is not even a single best language; there are only languages well suited or perhaps poorly suited for particular purposes.
-- Herbert Mayer

A working knowledge of shell scripting is essential to anyone wishing to become reasonably proficient at system administration, even if they do not anticipate ever having to actually write a script.

A shell script is a quick-and-dirty method of prototyping a complex application. Getting even a limited subset of the functionality to work in a script is often a useful first stage in project development. In this way, the structure of the application can be tested and tinkered with, and the major pitfalls found before proceeding to the final coding in C, C++, Java, Perl, or Python.

Shell scripting hearkens back to the classic UNIX philosophy of breaking complex projects into simpler subtasks, of chaining together components and utilities. Many consider this a better, or at least more esthetically pleasing approach to problem solving than using one of the new generation of high-powered all-in-one languages, such as Perl, which attempt to be all things to all people, but at the cost of forcing you to alter your thinking processes to fit the tool.

According to [Herbert Mayer](http://tldp.org/LDP/abs/html/biblio.html#MAYERREF), "a useful language needs arrays, pointers, and a generic mechanism for building data structures." By these criteria, shell scripting falls somewhat short of being "useful." Or, perhaps not. . . .

## Hello Bash

If you want to read Bash source code, please access http://ftp.gnu.org/gnu/bash/.

```
$ /bin/bash
$ echo $BASH
/bin/bash
```

## References

[Bash Scripting Tutorial](http://www.linuxconfig.org/Bash_scripting_Tutorial)
[Bash Programming How-To](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html)
[Bash Beginners Guide](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/Bash-Beginners-Guide.html)
[Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/)