sed tutorial: sed append command

The sed append command can add a new line before or after the specified matching line. We do this by using sed a and i...

Shell Command Test

The command test in the shell is used to check whether a condition is true. It can test numbers, strings and files. Number arguments test...

Shell Flow Control

The flow control of shell cannot be empty which is different from other languages ​​such as Java and PHP.The following is the writing of PHP...

Shell Command Printf

In the previous chapter we learn the command echo, this chapter we will introduce the command printf. Printf mimics the printf () program in the...

Shell Command Echo

Echo in shell is similar to the echo in PHP which all output string.The syntax for echo is: You can use echo to achieve more...

Shell Basic Operators

There are various operators supported by shell.We will now discuss the following operators: Arithmetic Operators Relational Operators Boolean Operators String Operators File Test Operators Bourne...

Shell Arrays

Shell arrays can hold multiple values,Bash shell only support one-dimensional values(can not support multi-dimensional) .We don’t need to define array size during initialization (similar to PHP).The...

Shell Passing Arguments

Arguments can be passed to the script when it is executed,we can get the arguments by the formats like $n.Inside the script, the $1 variable...

Shell Variable

When you define the a variable name, the name should not prefix $(excepting in PHP ),for example your_name="www.linuxcommands.site" We should not add blank space between...