About Bash

Origin of name Bash

The name is an acronym for "Bourne-Again Shell," and refers to the name of the author of the original Unix shell sh, Steve Bourne. Bash name can be read as "born again SH" (Bourne sounds very much like born), which clearly indicates the origin of the name Bash.


Authors


Sh Bourne shell was created around 1977 by Brian Fox, an employee of the Free Software Foundation. The project was most developed in the late eighties. In 1990, her main carer was Chet Ramey.


Popularity


Bash shell is the most popular he is in almost all distributions of GNU / Linux and Mac OS X version 10.4 Tiger. There are also versions for most Unix systems (eg * BSD). Bash is the default shell in Cygwin for Win32 systems.


License


The program is distributed under the GPL. The Network is of course available on the server the Free Software Foundation and its mirrors.


Similarities to the ...




As already stated, the Bash is a shell based on Sh, so both are very much in common (but they are not the same shell), orócz them also contains a number of extremely useful enhancements borrowed from the Korn shell (ksh), by David Korn and C shell (CSH), by Billy Joy. The Free Software Foundation Bash designed in such a way that was consistent with the specification "IEEE POSIX Shell and Utilities", developed by the Working Group of the 1003.2+ IEEE.


Sh


Most functions Bash inherits from the Bourne shell - Sh. Bash supports redirection as stream I / O or expansion of variables and parameters (called expansion). It has all the control functions and conditional, such as for, while, if f and the other occurring in Sh. Grammar Bash is a full implementation of the grammar, including the functions of Sh shell function. Standard variables defining the behavior of the coating, such as PS1, IFS or PATH also exist in Bash. In Bash, you can find a number of functions that are an extension of the possibility of Sh, Sh which do not occur. An example might be to powerful built-in command or the command test. Bash implements the new command $ (...) which are equivalent to the construction `...`. Besides, are also possible to define local variables in the functions of the shell, off, on and substitution of new versions of embedded commands.


Ksh

Bash is also variable RANDOM and REPLY. The first one returns a pseudo random number when it displays its value, or initialize the generator when it assigns a new value. The variable REPLY is the default variable that stores the value returned by the read command. Built-typeset command allows you to give variables attributes of the coating. For example, you can give the attribute "read only" (readonly). The Korn shell has also acquired a mechanism for arithmetic operations (called arithmetic evaluation). Shell variables can be used as operands to arithmetic operators, and store the results of operations. Implemented almost all arithmetic operators occurring in the ANSI C language, along with the order of execution of operations. Another extension is taken from an extensive mechanism ksh aliases. They allow new names to give commands such as alias del = rm, which causes the del command will be the same as executing the command rm. The alias can also define default parameters from the command, eg alias ls = "/ bin / ls-LF '.


Csh


C shell history mechanism is the source of the shell command line is available through the command:! the command. With this shell extension mechanism also transferred the contents of the curly braces (called brace expansion), the mechanism of user's home directory substitution using the tilde ($ HOME), and the pushd, popd and dirs


Example use of brace expansion is shown below:


$ Mkdir / tmp/new- {alpha, beta, gamma}-dir$ Ls / tmp
new-alpha-dir
new-beta-dir
new-gamma-dir
$ echo ba-{b, c, d}-sh
ba-ba b-sh-sh-c-d ba-sh

How to use the Bash?


If you're using a system of Linux Bash is probably not only installed, but now we use it, so you might want to learn how to exploit its full potential. This allows use of the system will be more enjoyable and more productive. But why learn to program in bash? It's simple - no longer think in terms of executing commands, copy files, create streams and redirection. It is to learn the language, which allows to use already known to us and allow powerful time saving tools. Bash the high-level mediator between us and the computer.


Documentation


Documentation is not the strong point of this programming language, but unfortunately the system does not have a good guide for learning Bash. There is a man page, but it is not too friendly for people with no previous contact with Bash - for those not familiar with the shell, it is almost useless.


Summary


It is worth mentioning that although Bash was designed for Unix-like GNU, it is working right now, like all GNU software on virtually any platform, Unix, Linux, and even in environments DOS, Windows and OS/2