sh vs bash vs ksh vs csh

linux shell vs bash vs ksh vs csh

Since the Bourne Again SHell is a superset of sh, all sh commands will also work in bash - but not vice versa. bash has many more features of its own, and, as the table below demonstrates, many features incorporated from other shells. Since the Turbo C shell is a superset of csh, all csh … Continue reading sh vs bash vs ksh vs csh

Advertisements

Bash common features

linux bash common features

The following features are standard in every shell. Note that the stop, suspend, jobs, bg and fg commands are only available on systems that support job control. Common Shell Features Command Meaning > Redirect output >> Append to file < Redirect input << "Here" document (redirect input) | Pipe output & Run process in background. … Continue reading Bash common features

Bash advanced variables

bash arrays

There are cases when you want to avoid this kind of behavior, for instance when handling telephone and other numbers. Apart from integers and variables, you may also want to specify a variable that is a constant. This is often done at the beginning of a script, when the value of the constant is declared. … Continue reading Bash advanced variables

Bash select menu and shift

bash select menu

The select construct allows easy menu generation. The syntax is quite similar to that of the for loop: select WORD [in LIST]; do RESPECTIVE-COMMANDS; done LIST is expanded, generating a list of items. The expansion is printed to standard error; each item is preceded by a number. If in LIST is not present, the positional … Continue reading Bash select menu and shift

Bash repetitive tasks ( for , while , until )

Bash repetitive tasks ( for , while , until )

To run a specific task or list of commands repetitively on bash script , you need to use on of this three constructions : for , while , until . Each one fits different situation as we will know now. The for loop The for loop is the first of the three shell looping constructs. … Continue reading Bash repetitive tasks ( for , while , until )