≡ Menu

Bash Tutorial

The Bash shell provides some variables that are prefixed with '~' (named tilde) which is called Tilde Expansions. They are synonyms for contents of other variables within your shell. Tilde expansion is the process of converting these abbreviations to the directory names that they stand for. In this article, let us review the tilde expansion [...]

{ 7 comments }

One of the operation of the shell when it analyzes the input is Shell expansion. Bash provides different types of expansion. In this article let us review an important expansion -- "Brace expansion". This article is part of our on-going Bash Tutorial series. Brace expansion is used to generate arbitrary strings. Brace expansion allows you [...]

{ 6 comments }

An array is a variable containing multiple values may be of same type or of different type.  There is no maximum limit to the size of an array, nor any requirement that member variables be indexed or assigned contiguously. Array index starts with zero. In this article, let us review 15 various array operations in [...]

{ 63 comments }

As part of our on-going bash tutorial series, we discussed about bash positional parameters in our previous article. In this article let us discuss about the bash special parameters with few practical shell script examples. Some of the bash special parameters that we will discuss in this article are: $*, $@, $#, $$, $!, $?, [...]

{ 7 comments }

A parameter is an entity that stores values. It can be a name, a number or some special characters. A variable is a parameter denoted by a name. Some variables are set for you already, and most of these cannot have values assigned to them. These variables contain useful information, which can be used by [...]

{ 10 comments }

This article is part of our on-going bash tutorial series. Like any other programming languages, Bash also provides variables. Bash variables provide temporary storage for information that will be needed during the lifespan of the program. Syntax: VARNAME=VALUE Note: There should not be any space around "=" sign in variable assignment. When you use VAR=VALUE, [...]

{ 5 comments }

Bash shell functions are a way to group several UNIX / Linux commands for later execution using a single name for the group. Bash shell function can be executed just like a regular Unix command. Shell functions are executed in the current shell context without creating any new process to interpret them. Both bash aliases [...]

{ 14 comments }

While most of us cannot kick someone ass like Jennifer Garner in Alias, we can at least try to use the Linux alias command effectively. An alias command is simple string substitution of one text for another, when it is used as the first word of a simple command. In this article let us review [...]

{ 17 comments }